Create the Conversation Channel Definition Record
The Conversation Channel Definition (ConversationChannelDefinition
) record contains metadata used for Bring Your Own Channel or Bring Your Own Channel for CCaaS integration.
Get the API names of the custom platform event you created and its custom fields. In the next task, you need the API names to set several parameters.
- From Setup, in the Quick Find box, enter
Platform Events
, and then select Platform Events. - Click the name of the custom platform event.
- Copy the API Name of the platform event. The API Name is in the format
devorg__TestEvent__e
. - In the Custom Fields and Relationships section, find and copy the API Names for the EventType and Payload fields. For example, the API Name for the EventType field is in the format
devorg__EventType__c
.
Use your preferred method, such as Tooling API, Metadata API, SOAP API, or SoapUI, to create the record. If you use the SoapUI to create the ConversationChannelDefinition record, verify that you’ve generated the enterprise WSDL. Otherwise, use the sample SOAP API payload to create the record.
-
Use one of the sample payloads to create the ConversationChannelDefinition record.
If you use Tooling API to create the record, send the POST request to this endpoint:
POST /services/data/v60.0/tooling/sobjects/ConversationChannelDefinition/
To configure the payload, follow these guidelines.
- developerName: Enter the API name in the format
{prefix}_{ConnectedAppName}
that you generated in Create the Interaction Service Connected App. For example,Partner1_ChannelDefinition1
has the given name “ChannelDefinition1” with the prefix “Partner1,” which matches the prefix of the connected app. - masterLabel: Set this value to the record’s label name in the UI. This name appears in several places in the UI, so include the messaging channel name for easy identification.
- connectedAppType: Set this value to the owner of the connected app used to manage authentication between Salesforce Interaction Service and the CCaaS partner system. Set to
Partner
to create the connected app and include it in your managed package as a partner vendor. Set toCustomer
to require the admin to create a connected app when they set up Bring Your Own Channel for CCaaS. If not set, this value defaults toPartner
. - conversationVendorInfo: Set this value to the
ConversationVendorInfo.developerName
value. This field applies to Metadata API and Tooling API. - conversationVendorInfoId: Set this value to the
ConversationChannelDefinition.ConversationVendorInfoId
value that's used to link this record to the ConversationVendorInfo record—for example,0m8000000000000123
. This field applies to SOAP API. - customPlatformEvent: Set this value to the API Name of the custom platform event—for example,
devorg__TestEvent__e
. - customEventTypeField: Set this value to the API name of the custom EventType field in the custom platform event—for example,
devorg__EventType__c
. - customEventPayloadField: Set this value to the API name of the custom Payload field in the custom platform event—for example,
devorg__Payload__c
. - capabilitiesSupportsCustomChannelParameters: Set this value to
true
to let administrators leverage custom parameters and parameter mappings. The default value is true. See Add Support for Custom Objects. - capabilitiesSupportsIsoCountryCode: Set this value to
true
to support ISO-3166 country codes. The default value isfalse
. - capabilitiesSupportsKeywords: Set this value to
true
to support keywords when Salesforce manages consent levels. - capabilitiesSupportsImplicitConsent: Set this value to
true
to expose the Implicit Opt-In consent level to the administrator. This field is required and must be set totrue
. The default value isfalse
. To learn more about consent levels, see Configure Levels to Customize the Messaging Opt-In and Opt-Out Experience. - capabilitiesSupportsExplicitConsent: Set this value to
true
to expose the Explicit Opt-In consent level to the administrator. The default value isfalse
. This field is optional. To learn more about consent levels, see Configure Consent Levels to Customize the Messaging Opt-In and Opt-Out Experience. - customIcon: Set this value to the name of the static resource image you want to use to identify this channel integration, such as a channel logo. For the best results, set the image size to 50px x 50px and save the image in SVG file format. This field is optional. To learn more about custom icons, see Add a Custom Icon.
- routingOwner: Set this value to the system you use to manage routing. Set to
Salesforce
to let Salesforce Omni-Channel manage routing. Set toPartner
to let the partner system manage routing. If not set, this value defaults toSalesforce
. - consentOwner: Set this value to the system you use to manage consent levels. Set to
Salesforce
to let Salesforce manage consent levels. Set toPartner
to let the partner system manage consent levels. If set toPartner
, you must setcapabilitiesSupportsKeywords
to false. If not set, this value defaults toSalesforce
.
- developerName: Enter the API name in the format
-
After the record is created, copy the ConversationChannelDefinition record ID that's returned in the response. You need it to create the messaging channel.
Use these sample payloads as templates to create ConversationChannelDefinition records.
Consider these optional tasks when creating the ConversationChannelDefinition Record:
- Configure Consent Levels to Customize the Messaging Opt-In and Opt-Out Experience
- Configure Partner-Owned Routing and Consent
- Add Custom Icon
- Add Support for Custom Objects
See Also
- Tooling API Guide: ConversationChannelDefinition
- Metadata API Guide: ConversationChannelDefinition
- Object Reference: ConversationChannelDefinition