resourcename.fieldname
Section: business-attributes
Default Value:
Valid Values:
Changes Take Effect: Immediately
Associates a Business Attribute key with the name of the Business Attribute configured in the proper tenant.
- Possible resource name values are:
- Service
- State
- Task
- Possible field name values to map are:
- type (for service type)
- disposition
- application_type
- resource_type
- media_type
- Such as, for instance: Service.service_type, Task.disposition, State.media_type.
- If there is no configuration for a given field, Context Services automatically allows any valid integer value for this field. In this case, your application is responsible for the value's validity.
- A Business Attribute can be mapped to several resource fields. For instance, the Service.media_type and Task.media_type string can both point to the "MediaType" Business Attributes.
map-names
Section: business-attributes
Default Value: false
Valid Values: String
Changes Take Effect: Immediately
Set to true to return the Names of Business Attribute Values instead of DB IDs in the responses for GET operations; false (default) to return the DB IDs of Business Attribute Values in the responses for GET operations.
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.
Customizing Profiles
You can edit the information displayed in the GLOBAL_PROFILE_EXTENSIONS section of the profileconfig.json file:
- Add or remove information in mapping and CustomerProperties section.
- Edit icons and color for customerName, EmailAddress, and PhoneNumber fields.
- Add or remove search menu items in the searchOptions section.
"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"}
}Reversing Timeline Display
- Introduced in: 8.5.207.05
The Journey Timeline can display a Conversation in reverse order with latest events displayed on top of the history. To activate the reverse order, edit the PROFILE_CONFIG section of the profileconfig.json file and add the following attribute:
"TIMELINE_CUSTOMIZATION": {
"stateOrder": "reverse"
}Customizing Display for States
The UI displays name and state information about states in the timelines and details panels. You can expand this information by configuring which JSON extension your wish to display in the "STATE_EXPRESSIONS" section of the profileconfig.json file as explained below.
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>"
}Customize Timeline icons for service, event, and task
- In the business-attributes section of your GMS application, configure map-names = true
- Define "media_type=MediaType" for Service, State, and Task (resourcename.fieldname)
- Service.media_type=MediaType
- State.media_type=MediaType
- Task.media_type=MediaType
- Find the Business Attributes in your Environment. Create the MediaType Business Attribute.
- Add media names such as voice, ivr, agent, email, and so on as New Business Attribute Values to MediaType. For example, create the Business Attribute Value voice where the name field is voice.
- Modify and replace TIMELINE_ICONS and TIMELINE_COLORS with the MediaType names and, if required, the icons in the file
`\gsg-app\gsg-server\gsg-web\src\main\webapp\develop\app\configuration\configuration.json`
For example :
"TIMELINE_ICONS": {
"voice" : "fonticon icon-audio-voice",
"voip" : "fonticon icon-agent",
"email" : "fonticon icon-email",
"vmail" : "fonticon icon-voicemail",
"smail" : "fonticon icon-email",
"chat" : "fonticon icon-chat",
"video" : "fonticon icon-chat-video",
"cobrowsing" : "fonticon icon-cobrowse",
"whiteboard" : "fonticon icon-checkbox",
"appsharing" : "fonticon icon-share",
"webform" : "fonticon icon-page-single",
"workitem" : "fonticon icon-agent-status-work",
"callback" : "fonticon icon-iw-active-circle-callback",
"fax" : "fonticon icon-printer",
"imchat" : "fonticon icon-people-chat",
"busevent" : "fonticon icon-event-cluster",
"alert" : "fonticon icon-alert-triangle",
"sms" : "fonticon icon-sms-transfer",
"any" : "fonticon icon-help",
"auxwork" : "fonticon icon-agent-status-work",
"outboundpreview" : "fonticon icon-outbound",
"trainingitem" : "fonticon icon-training",
"smssession" : "fonticon icon-sms-message",
"mms" : "fonticon icon-inspect",
"mmssession" : "fonticon icon-inspect-chat",
"default" : "fonticon icon-agent-status-queue-empty"
},
"TIMELINE_COLORS": {
"voice" : "#203B73",
"voip": "#2E69DB",
"email" : "#5E99FF",
"vmail" : "#9BBCE0",
"smail" : "#5A6B8C",
"chat" : "#0F6A51",
"video" : "#569180",
"cobrowsing" : "#14819C",
"whiteboard" : "#7EC0C2",
"appsharing" : "#AFD6D2",
"webform" : "#584FB3",
"workitem" : "#7272E0",
"callback" : "#B9B9F0",
"fax" : "#575746",
"imchat" : "#827C75",
"busevent" : "#C9C4B7",
"alert" : "#8C6542",
"sms" : "#8A4D67",
"any" : "#C48C88",
"auxwork" : "#EBC8BE",
"outboundpreview" : "#724787",
"trainingitem" : "#B07EC2",
"smssession" : "#D1B4D9",
"mms" : "#555D66",
"mmssession" : "#4AC764",
"default" : "#555D66"
},
As a result, the timeline uses the customized icons to display GMS requests that include one of MediaType Business Attribute Values in the media_type parameter.
- If the media_type parameter includes an invalid value, the request fails.
- If the request is missing the media_type parameter, the timeline uses the icon corresponding to "media_type": "any" by default.
- If you provide a valid media_type which is not mapped to any value in the TIMELINE_ICONS and TIMELINE_COLORS arrays, the timeline uses the icon corresponding to "media_type": "default".


