Create the Conversation Channel Definition Record

The Conversation Channel Definition (ConversationChannelDefinition) record contains metadata used for Partner Messaging channel 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.

  1. From Setup, in the Quick Find box, enter Platform Events, and then select Platform Events.
  2. Click the name of the custom platform event.
  3. Copy the API Name of the platform event. The API Name is in the format devorg\_\_TestEvent\_\_e.
  4. 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.

  1. 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 partner channel name for easy identification.
    • 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.
    • supportsIsoCountryCode: Set this value to true to support ISO-3166 country codes. The default value is false.
    • supportsKeywords: Set this value to true to support keywords when the administrator configures consent levels.
    • supportsImplicitConsent: Set this value to true to expose the Implicit Opt-In consent level to the administrator. This field is required and must be set to true. The default value is false. To learn more about consent levels, see Consent Levels to Customize the Messaging Opt-In and Opt-Out Experience.
    • supportsExplicitConsent: Set this value to true to expose the Explicit Opt-In consent level to the administrator. The default value is false. This field is optional. To learn more about consent levels, see Consent Levels to Customize the Messaging Opt-In and Opt-Out Experience.
    • routingOwner: Set this value to Salesforce.
    • consentOwner: Set this value to Salesforce.
  2. After the record is created, copy the ConversationChannelDefinition record ID that's returned in the response. You need it to create the Partner Messaging channel.

Use these sample payloads as templates to create ConversationChannelDefinition records for Partner Messaging.

Administrators can configure consent-level options to customize the opt-in and opt-out experience for Messaging channels. The ConversationChannelDefinition record includes fields that determine which consent-level options are exposed to the administrator.

To determine the consent levels you want to expose to the administrators, when you create the ConversationChannelDefinition record, set the capabilitiesSupportsImplicitConsent and capabilitiesSupportsExplicitConsent fields.

  • capabilitiesSupportsImplicitConsent: Determines whether the Implicit Opt-In consent level is exposed to the administrator (true). This field is required and must be set to true. The default value is false.
  • capabilitiesSupportsExplicitConsent: Determines whether the Explicit Opt-In consent level is exposed to the administrator (true). The default value is false. This field is optional.

The capabilitiesSupportsDoubleOptInConsent field, which exposes the Double Opt-In consent level option, isn’t supported for Partner Messaging.

To learn more about consent levels, see Salesforce Help: Customize the Messaging Opt-In and Opt-Out Experience.

See Also