- DarkLight
Get Customer Journey
- DarkLight
Overview
The GetCustomerJourney API provides the list of interactions, both successful and failed attempts, across all campaigns, for Inbound and Outbound calls. This information is based on the AccountNumber or ContactNumber.
Pre-requisite
The Agent must be on an active call or logged in to the application.
Sequence Diagram
Message Structure
Request Parameters | Value |
---|---|
channel | LCM |
topic | Webservice |
subtopic | GetCustomerJourney |
source | «app-name-broadcasting-this-message» |
data | «JSON Object» |
Data Parameters
Parameter | Mandatory | Data Type | Description |
---|---|---|---|
callid | No | String | To search customer journey based on the Call ID. |
AccountNumber | No | String | To search customer journey based on the Account Number (LCMKey). |
CampaignName | No | String | The Campaign name. |
ChannelID | Yes | String | To search customer journey for a specific channel.
|
MonthType | Yes | String | To search customer journey for a specific duration - 3, 6, 9, or 12 months are possible values. |
ContactNumber | No | String | To get all customer interactions for a specific contact number.
|
Note
If you pass only the ContactNumber, the API searches the customer interactions based on specific phone number only. If you pass both parameters - AccountNumber and ContactNumber - the API prioritizes AccountNumber and fetches interactions matching the AccountNumber only.
Response Parameters | Value |
---|---|
channel | LCM |
topic | Webservice |
subtopic | CustomerJourney |
message | «JSON Object» |
Message Parameters
Parameter | Mandatory | Data Type | Description |
---|---|---|---|
callid | Yes | String | Call ID. |
response | Yes | JSON Array | Customer Interaction data. |
Response Parameters | |||
ContactID | Yes | String | The contact ID for customer interaction. |
CampaignName | Yes | String | The campaign name. |
ModeID | Yes | String | The mode ID of the contact. |
Mode | Yes | String | The mode name of the contact. |
OutcomeID | The outcome ID. | ||
Outcome | The outcome value for this outcome ID. | ||
AgentName | The agent login name. | ||
AgentComment | The comments noted by the agent. | ||
CallCompletedTime | The time at which the call was completed. (DDMMYYYY HH:mm:ss, in am/pm format) | ||
CallCompletedDate | The date on which the call was completed. | ||
CallCompletedMonth | The month in which the call ws completed. | ||
CallCompletedYear | The year in which the call was completed. | ||
ChannelType | The channel type. | ||
TargetValue | The target value set for the agent. | ||
ContactValue | The contact phone number. | ||
CallCompletedTimeFormat | The call completed time in HH:mm (am/pm) format. | ||
PreviousLeadScore | The lead score of the contact before the call commencement. | ||
CurrentLeadScore | The lead score of the contact after the call completes, that is, after the agent updates. | ||
CallType | The call type - Inbound or Outbound. |
Possible Error Cases
Error Type | Actual Error | Message |
---|---|---|
WS_Error | Callid is empty | Invalid Call ID. |
WS_Error | Invalid Call ID:<call_id> | Invalid Call ID. |
Sample Request - By AccountNumber
{
"channel": "LCM",
"topic": "WebService",
"subtopic": "GetCustomerJourney",
"data":
{
"callid": "12345",
"AccountNumber": "2|3|3|0|0|44|1",
"CampaignName": "SamplePreviewCampaign-ACQ",
"ChannelID": "-1",
"MonthType": "5"
}
}
Sample Request - By ContactNumber
{
"channel": "LCM",
"topic": "WebService",
"subtopic": "GetCustomerJourney",
"data":
{
"AccountNumber": "",
"CampaignName": "tmasi",
"ChannelID": 2,
"MonthType": 10,
"ContactNumber": "909003299700"
}
}
Sample Request - By AccountNumber and ContactNumber
{
"channel": "LCM",
"topic": "WebService",
"subtopic": "GetCustomerJourney",
"data":
{
"AccountNumber": "9|3|1711|0|0|84|-1",
"CampaignName": "tmasi",
"ChannelID": 2,
"MonthType": 10,
"ContactNumber": "909003299700"
}
}
Sample Response - By ContactNumber
{
"channel": "LCM",
"topic": "WebService",
"subtopic": "CustomerJourney",
"message":
{
"callid": "12345",
"response":
[
{
"ContactID": "2",
"CampaignName": "SamplePreviewCampaign-ACQ",
"ModeID": 3,
"Mode": "Mobile",
"OutcomeId": 0,
"Outcome": "Success",
"AgentName": "AECAgent",
"AgentComment": "",
"CallCompletedTime": "5/12/2020 9:22:23 AM",
"CallCompletedDate": "12",
"CallCompletedMonth": "May",
"CallCompletedYear": "2020",
"ChannelType": 2,
"TargetValue": "0",
"ContactValue": "6591462346",
"CallCompletedTimeFormat": "09:22 AM",
"PreviousLeadScore": "0",
"CurrentLeadScore": "0",
"CallType": "Outbound"
}
]
}
}