D365 Customer Service: Slugs
Slugs. This is not about your average garden variety slug. This relates to placeholders that are used to dynamically show or refer to data within D365 Customer Service Workspace and Omnichannel Engagement Hub.
Slugs are used in various ways and depending on how the slug is used, the syntax of use is different. In this blog, I’ll share the different ways slugs can be used as well as the syntax needed for the particular scenarios:
Notification Templates
When configuring a notification template which notifies the agent of the incoming conversation. More information about notifications can be found here: Microsoft Docs.
The below slugs will only work where a contact or account has been identified via Channel Integration Framework v2 API. When using Omnichannel for Customer Service, this will happen by default. However, when working with third party ISVs, this should be validated.
Name | Omnichannel for Customer Service | Customer Service Workspace |
Customer Name: Name of Customer initiating the conversation. | {customerName} | {ContextVariable}* |
Customer Type: Data saved in the customer type field on the customer’s record | {$odata.contact.customertypecode.?$filter=contactid eq ‘{contactid}’&$select=customertypecode} | Not Currently Possible |
Pre Chat Question: Data populated from customer in the pre chat conversation record | {ChatReason} | {ContextVariable}* |
Power Virtual Agent Response: Response data populated when interacting with the Power Virtual Agent Bot | {ChatReason} | Not Currently Possible |
* Although the Customer Service Workspace is quite similar to the Omnichannel experience, it does not contain the ability to use the native channels. Therefore this will be dependent on what is provided in the context passed to the conversation from the ISV being used. The name of the variable being passed in the context via the Channel Integration Framework should be used.
Application Tab Templates
Application Tab Templates define which tabs are available within each session during a conversation. More information about application tabs can be found here: Microsoft Docs
Name | Omnichannel for Customer Service | Customer Service Workspace |
Third Party Website: When navigating to a third party website, there may be a need to pass information related to the current session or customer for the search. | {customerName} | Not Currently Possible |
Macros
Macros allow repetitive tasks to be automated, freeing up time for an agent to focus on other things during the call. More information about macros can be found here: Microsoft Docs
The below examples relate to the macro to open a new form and create a record. However, the syntax used will apply for the other types of macros as well. We will be creating a new case record prepopulating data from the customer record.
Name | Omnichannel for Customer Service | Customer Service Workspace |
Customer: Lookup field on the case form | {customerName} {customerRecordId} {customerEntityName} Setting a lookup field in the macro requires all three components of the lookup to be set. | {anchor.customerid} where customerid is the attribute name of the field on the anchor record. |
Customer Type:* Choice field prepopulated with data taken from customer’s customer type field. | {$odata.contact.customertypecode.?$filter=contactid eq ‘{contactid}’&$select=customertypecode} | Not Currently Possible |
Title: Text field populated with data provided from the pre chat questionnaire | {chatReason} where chatReason is the name of the PreChat Question | {ContextVariable}** |
* pulling data from DataVerse will only go one level deep. Therefore, you will not be able to get data associate to the contact's account that's associated to the incident. However you will be able to get contact data that is associated to the incident. ** Although the Customer Service Workspace is quite similar to the Omnichannel experience, it does not contain the ability to use the native channels. Therefore this will be dependent on what is provided in the context passed to the conversation from the ISV being used. The name of the variable being passed in the context via the Channel Integration Framework should be used.
Agent Scripts
Agent Scripts provide guidance to an agent during a conversation. A default script can be configured based on the customer details or what has been provided by the customer in the pre chat questionnaire of chat bot. More information about agent scripts can be found here: Microsoft Docs.
Name | Omnichannel for Customer Service | Customer Service Workspace |
Agent Script Condition: When using the agent script condition to set the default script associated to the conversation | ${ChatReason} | ${anchor.title} |
As you can see from the examples, the main differences are :
- The Customer Service Workspace relies on the anchor tab whereas the Omnichannel experience utilises the session, anchor, dataverse and entity variables.
- When being used to evaluate a condition, the $ symbol should be placed in front of the slug
This was originally posted here.
*This post is locked for comments