Contents
Customizing Journey Timeline
Customizing Journey Timelines
All customization can be done in a few steps:
- Edit the <Context_Services_HOME>/files/configprofileconfig.json file that contains all information relative to the displayed data of the timeline UI.
- Read further sections explaining how you can create new data to be displayed for both states and profiles, then edit the profileconfig.json file.
- Be sure to restart your Context Services application after you saved your edits.
"GLOBAL_PROFILE_EXTENSIONS":{
"mapping":{"Phone Number": "PhoneNumber", "Email":"EmailAddress", "Customer ID":"customer_id", "Anonymous ID": "Anonymous ID", "Country": "Country", "AddressState": "State", "Title":"Title", "City":"City", "Language":"Language"},
"searchOptions":{"Phone Number": "PhoneNumber", "Email":"EmailAddress", "Customer ID":"customer_id", "Anonymous ID": "Anonymous ID"},
"ExtraQueryOptions": {"include_profile":"yes"},
"CustomerProperties": [{"label":"customer_id", "value":"Customer ID", "showInTable":"no", "primaryKey":"yes"},
{"label":"LastName", "value":"Last Name"},
{"label":"FirstName", "value":"First Name"},
{"label":"PhoneNumber", "value":"Phone"},
{"label":"EmailAddress", "value":"Email"},
{"label":"Country", "value":"Country"},
{"label":"AddressState", "value":"State"},
{"label":"Title", "value":"Title"},
{"label":"City", "value":"City"},
{"label":"Language", "value":"Language"}],
"customerName": {"icon":"fonticon icon-person", "color": "#2E69DB"},
"EmailAddress": {"icon":"fonticon icon-email", "color":"#555D66"},
"PhoneNumber": {"icon":"fonticon icon-phone", "color":"#A6AAAF"}
}Mapping with extension
To add a JSON extension, to a service, state, or task, all you need to do is to specify the JSON extension value when creating or updating your resources with a REST query. For instance, you can define a new CRMData state extension with a simple POST query at state completion:
POST http://localhost:8080/genesys/1/cs/services/711982/states/5362/end
{
"service_id": 711982,
"CRMData": {
"caseNumber": “GF4GHL",
"caseOwner": "Bogota 11:00 - 12:00"
},
"state_id": 2357138,
"duration": 26,
"state_type": “Support Ticket",
"started": {
"timestamp": "2015-04-08T11:50:46.287Z",
"media_type": "mobile",
"application_id": 5000
},
"completed": {
"timestamp": "2015-04-08T11:50:46.313Z"
}
}In the above code snippet, the CRMData extension contains two fields: caseNumber and caseOwner:
"CRMData": {
"caseNumber": "GF4GHL",
"caseOwner": "Bogota 11:00 - 12:00"
}To display the CRMData extension in the state boxes of the UI, edit profileconfig.json and find the "STATE_EXPRESSIONS" section. This is where you can add an html expression used to display your extension information.
"STATE_EXPRESSIONS":{
"CRMData": <state expression>
}The expression can include standard html elements and angular expression mapped with the extension fields, available in the additionalInfo object.
- If your extension is not an object, you can access its value by calling additionalInfo.values.
- If your extension is an object, you can access field values by calling additionalInfo.values.<field_name>.
For instance, the fields of CRMData are available in additionalInfo.value.caseOwner and additionalInfo.value.caseNumber variables. The following code snippet shows how to display these fields in the state boxes of the UI.
"STATE_EXPRESSIONS":{
"CRMData": "<p> {{additionalInfo.value.caseOwner}}'s case number is {{additionalInfo.value.caseNumber}} </p>"
}

