Endpoint /actionevent not working

Hey
What I'm trying to accomplish is to automatically send an errored state in response to a contentOffer.

I'm grabbing a Journey.qualifiedContentOffer event and trying to call the
api/v2/journey/deployments/{deploymentId}/actionevent
And here 2 things

  1. where can I get the sessionId from? Looks like this code
ac('api.session.getId', (err, IdInfo) => {
        if (err) {
        // handle error
        return;
        }
        return IdInfo;
        });

generated a new sessionId and not the one I should use.

  1. even if I manually take the sessionId from the ping, the call returns nothing.
    Example:
curl 'https://api.mypurecloud.com/api/v2/journey/deployments/xxxx-xxxx-xxxx-xxxx/actionevent' \
  -H 'Accept: */*' \
  -H 'Content-Type: application/json' \
  --data-raw '{"sessionId":"xxx","actionId":"xxx","actionState":"engaged"}'

From what I can see all events e.g. closing content offer uses a different API:

https://api.mypurecloud.de/api/v2/journey/deployments/xxx-xxx-xxxx/customers/xxxx-xxxx-xxxx/beacons?data=BASE64ENCODEDDATA&type=webactionevent

So how is it with this API, does it work at all?

Ok, let's ignore the 1st part of the question for now.

I am almost certain that the endpoint indicated in point 2 does not work at all. Using the endpoint

https://api.mypurecloud.de/api/v2/journey/sessions/web/recent?pageSize=20

I retrieve the last sessionId. I use it later in the request:

curl 'https://api.mypurecloud.com/api/v2/journey/deployments/10bd8ff4-b4df-425e-8d8c-5b302c039cf8/actionevent' }
  -H 'Content-Type: application/json' }
  --data-raw '{"sessionId":"4e521990-2e41-11ef-a8fa-55b338f632f1","actionId":"808e899a-51ac-3ac2-8c3b-4ad788623e82","actionState":"engaged"}

In response I get 204 No Content
I don't see a single engaged status in the ActionMap report.

PS. Yes, I have a hanging offer at this time. I am using the correct ActionId.

Please confirm that in the given scenario this should work.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.