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
- 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.
- 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?