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