Configuring Activity History
By default, the adapter updates certain Salesforce activity fields when it saves an activity history entry at the end of a call, chat, email, or outbound call for a preview mode campaign. Take a look at the table below for the full list of Salesforce activity fields and where the data comes from in the adapter.
Salesforce Activity Field | Genesys |
---|---|
Assigned To | Agent accepting Call |
Created By | " |
Last Modified By | " |
Subject | Text (including the type of call, such as inbound, outbound to #Phonenumber). |
Email body | Text from the email content field for inbound and outbound replies. |
Due Date | Current Timestamp |
Related To | Record currently in context when an agent clicks Mark Done |
Comments | Text with information from the Subject, Case Data (the full set that comes from the adapter), and Note (note data added by the agent) fields. |
Status | Values are preset in the Salesforce configuration |
Priority | Values are preset in the Salesforce configuration |
Call Duration | Duration in seconds |
Call Object Identifier | Interaction Id |
Call Type | Type of call, such as inbound, outbound, or internal |
You can also define a mapping between custom activity field names in Salesforce and Genesys UserData keys so that these custom fields are populated when the adapter saves an activity history entry at the end of a call, chat, or email. This is useful when you want to include or use call, chat, or email related data in your Salesforce reports.
To enable this functionality, set the salesforce.activity-log.field-mapping option to the name of a configuration section that contains the mapping.
You can control which types of calls and chats are saved to a Salesforce activity history entry by setting the salesforce.activity-log.enabled-call-types and salesforce.activity-log.enabled-chat-types.
Custom templates
You can specify what the adapter saves for the subject field in the Salesforce activity by using custom templates with the templates.salesforce.<interaction type>.<salesforce argument> option, where:
- <interaction type> is either inbound-voice, outbound-voice, transfer-voice, chat, or email.
- <salesforce argument> is subject (the adapter currently supports only this argument).
The value is a string that contains any text, along with templating variables wrapped in the reserved "{" and "}" characters.
You can use as many instances of this option as you need to handle multiple interactions types. For example, your configuration could include options for each of the supported interaction types:
- templates.salesforce.inbound-voice.subject
- templates.salesforce.outbound-voice.subject
- templates.salesforce.transfer-voice.subject
- templates.salesforce.chat.subject
The adapter supports the following templating variables:
Variable | Description |
---|---|
interaction.ani | The number that originated the call. This variable identifies the caller for inbound calls and is best used in inbound templates. |
interaction.callType | The type of call (inbound/outbound). |
interaction.caseId | The unique ID of the related case. |
interaction.contact | The first and last name of contact. |
interaction.dnis | The last call dialed (useful for call transfer). This variable identifies the outbound location for outbound calls and is best used in outbound templates. |
interaction.endDate | The date and time when interaction ended. |
interaction.isConsultation | This is true if the interaction is a consultation. |
interaction.startDate | The date and time when the interaction started. |
userData.<key> | This can be any UserData key available for the interaction. You might also find some of the following UserData keys useful (they're included by default by Workspace Web Edition on transfers):
|
contact.EmailAddresses | A list of email addresses associated with the contact. |
contact.PhoneNumbers | A list of phone numbers associated with the contact. |
For example, you might want the activity for all inbound voice calls to have details about the customer's name and phone number. In this case, here's how you would configure the option:
templates.salesforce.inbound-voice.subject = Customer: {interaction.contact}, Phone Number: {interaction.ani}
If a call comes in from Willard Clinton at 123-456-7890, when the call ends the adapter creates the related activity in Salesforce with following subject field: Customer: Willard Clinton, Phone Number: 123-456-7890
Another common use case might be to include information from UserData for all inbound calls. This could come from your own UserData keys or from UserData provided by Workspace Web Edition (see the table above). For example, you want the activity history's subject to include information from your own UserData key, PurposeOfCall, and the contact's name. Here's how you should configure the option:
templates.salesforce.inbound-voice.subject = Call from {interaction.contact} about {userData.PurposeOfCall}
In this scenario, if Willard Clinton calls into the contact center and chooses the Technical Support option in the IVR, that information is saved in the PurposeOfCall UserData key. When the call ends, the adapter creates the related activity in Salesforce with the following subject field: Call from Willard Clinton about Technical Support