Alessandro_Casolla | 2021-08-11 08:08:42 UTC | #1
Hello,
we want to build a page that shows the journey of a customer and embed it inside a CRM, in the same way that genesys has done with Salesforce and the journey view.
What API should i use to retrieve the journey of a customer by interaction id ?
I have only found analytics aggregates query :
https://developer.genesys.cloud/api/rest/v2/analytics/journeys
but nothing that returns the history of a journey.
Thx,
Alessandro
William_Clifford | 2021-08-11 17:39:50 UTC | #2
Hi Alessandro,
To load a Journey you will first need an externalContactId or customerId/customerIdType which you can obtain from the interaction details: GET /api/v2/conversations
To retrieve the journey we then piece together some information from various endpoints. The most important to show a basic journey are:
- Retrieving Sessions
by externalContactId: GET /api/v2/journey/externalcontacts/{externalContactId}/sessions (Preferable where possible) OR Sessions by customerId/customerIdType: GET /api/v2/journey/customers/{customerIdType}/{customerId}/sessions
- For each session you will then need to retrieve the events for that session, which we use to populate the journey timeline:
GET /api/v2/journey/sessions/{sessionId}/events
- Additional information such as Segment matches and Outcomes achieved can be retrieved on a per session basis:
GET /api/v2/journey/sessions/{sessionId}/segments GET /api/v2/journey/sessions/{sessionId}/outcomescores
Some extra information for segments and outcomes such as names and colours can be retrieved using segment and outcome related endpoints here: Journey Endpoints Unfortunately some of the others mentioned above don't appear to be listed here yet.
I hope this helps with your query.
Regards, William
Alessandro_Casolla | 2021-08-13 13:01:08 UTC | #3
William_Clifford, post:2, topic:11712
others
William thx for your detailed reply. The issue was that we didn't find the api listed on the docs, but now we have something to work with.
tim.smith | 2021-08-17 12:29:31 UTC | #4
William_Clifford, post:2, topic:11712
Unfortunately some of the others mentioned above don't appear to be listed here yet.
About half of the Journey APIs aren't yet released. Once Journey becomes GA, they'll be moved out of the preview resources and into the published Journey resources. https://developer.genesys.cloud/api/rest/v2/previewapis/
system | 2021-09-17 12:29:56 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 11712