# Create the Conversation Channel Definition Record

The Conversation Channel Definition (`ConversationChannelDefinition`) record contains metadata used for Bring Your Own Channel for Messaging integration.

## Task 1: Gather the API Names of the Custom Platform Events

Get the API names of the custom platform event that 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`.

## Task 2: Create the ConversationChannelDefinition Record

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](#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 ConversationChannelDefinition API name using the same prefix as specified in the external client app (ECA) or connected app developer name. Use the format `{prefix}_{ExternalClientAppName}` or `{prefix}_{ConnectedAppName}` that you generated in [Create the Interaction Service OAuth App](/docs/service/messaging-partner/guide/create-connected-app.md). For example, `Partner1_ChannelDefinition1` has the given name “ChannelDefinition1” with the prefix “Partner1,” which matches the prefix of the ECA or 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 external client app (ECA) or connected app used to manage authentication between Salesforce Interaction Service and the partner messaging system. Set to `Partner` to create the [ECA or connected app](/docs/service/messaging-partner/guide/create-connected-app.md) and include it in your managed package as a partner vendor. Set to `Customer` to require the admin to create an ECA or connected app when they set up Bring Your Own Channel. If not set, this value defaults to `Partner`.
   - **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](/docs/service/messaging-partner/guide/add-custom-objects.md).
   - **CapabilitiesSupportsIsoCountryCode**: Set this value to `true` to support ISO-3166 country codes. The default value is `false`.
   - **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 to `true`. The default value is `false`. To learn more about consent levels, see [Configure Levels to Customize the Messaging Opt-In and Opt-Out Experience](/docs/service/messaging-partner/guide/configure-consent-levels.md).
   - **CapabilitiesSupportsExplicitConsent**: 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 [Configure Consent Levels to Customize the Messaging Opt-In and Opt-Out Experience](/docs/service/messaging-partner/guide/configure-consent-levels.md).
   - **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](/docs/service/messaging-partner/guide/add-custom-icon.md).
   - **RoutingOwner**: Set to `Salesforce` to let Salesforce Omni-Channel manage routing. For Bring Your Own Channel for Messaging, this is the only supported value. If not set, this value defaults to `Salesforce`.
   - **ConsentOwner**: Set to `Salesforce` to let Salesforce manage consent levels. For Bring Your Own Channel for Messaging, this is the only supported value. If not set, this value defaults to `Salesforce`.
   - **EventCapabilitiesIsInboundAcknwOptionExposed:** Set this value to `true` to permit the Salesforce admin to opt in to read receipts and delivery receipts for inbound messages. Set this value to `false` to disable inbound acknowledgements and hide the setting from the Salesforce admin in the Messaging Settings. The default is `false`. To learn more about inbound receipts, see [Configure Inbound Acknowledgements and Outbound Typing Indicators](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/inbound-acknowledgements-typing-indicators.md).
   - **EventCapabilitiesIsProgressIndicatorOptExposed**: Set this value to `true` to permit the Salesforce admin to opt in to progress indicators for AI agents. Set this value to `false` to disable progress indicators and hide the setting from the Salesforce admin in the Messaging Settings. The default is `false`. To learn more about inbound receipts, see [Configure Agentforce Service Agent Progress Indicators](/docs/service/messaging-partner/guide/progress-indicators.md).
   - **EventCapabilitiesIsRoutingWorkResultSupported**: Set this value to `true` to send the Routing Work Result event is as a Custom Platform event. The default value is `false`.
   - **EventCapabilitiesIsTypingIndicatorOptionHidden**: Set this value to `false` to support allowing the Salesforce admin to opt in to typing indicators for outbound messages. Set this value to `true` to disable typing indicators for outbound messages and hide the setting from the Salesforce admin in the Messaging Settings. The default is `false`. To learn more about typing indicators, see [Configure Inbound Acknowledgements and Outbound Typing Indicators](https://developer.salesforce.com/docs/service/messaging-byoc-ccaas/guide/inbound-acknowledgements-typing-indicators.md).
   - **IsConferenceSupported**: Set this value to true to permit more than two participants in a Messaging session. To learn more about Conferencing for Messaging, see [Add Multiple Participants to a Messaging Conference](/docs/service/messaging-partner/guide/conference.md).
   - **MaxParticipantsForCnfrOverride**: Set this value to a number limit for how many participants can be in a messaging conference. This field is needed only if you want to use a different limit instead of the platform limit. If this field isn’t set or is set to a value higher than the Messaging platform limit, the integration defaults to the Messaging platform limit of how many participants can be in a messaging conference at one time. If `maxParticipantsForCnfrOverride` is set, `isConferenceSupported` should be `true`. To learn more about Conferencing for Messaging, see [Add Multiple Participants to a Messaging Conference](/docs/service/messaging-partner/guide/conference.md).

## Sample Payloads

Use these sample payloads as templates to create ConversationChannelDefinition records.

```sfdocs-code {"lang":"json", "title": "Tooling API" }
{
  "Metadata": {
    "developerName": "Partner1_ChannelDefinition1",
    "masterLabel": "Channel Definition 1",
    "consentOwner": "Salesforce",
    "conversationVendorInfo": "partnerName",
    "customPlatformEvent": "devorg**TestEvent**e",
    "customEventTypeField": "devorg**EventType**c",
    "customEventPayloadField": "devorg**Payload**c",
    "customIcon": "mylogo",
    "isInboundAcknwOptionExposed": true,
    "isTypingIndicatorOptionHidden": false,
    "routingOwner": "Salesforce",
    "supportsCustomChannelParameters": true,
    "supportsKeywords": true,
    "supportsIsoCountryCode": true,
    "supportsImplicitConsent": true,
    "supportsExplicitConsent": false,
    "supportsDoubleOptInConsent": false
  },
  "FullName": "Partner1_ChannelDefinition1"
}
```

```sfdocs-code {"lang":"json", "title": "SOAP API" }
{
  "DeveloperName": "Partner1_ChannelDefinition1",
  "MasterLabel": "Channel Definition 1",
  "ConversationVendorInfoId": "0m8000000000000123",
  "CustomPlatformEvent": "devorg**TestEvent**e",
  "CustomEventTypeField": "devorg**EventType**c",
  "CustomEventPayloadField": "devorg**Payload**c",
  "CustomIconId": "mylogo",
  "CapabilitiesSupportsKeywords": true,
  "CapabilitiesSupportsIsoCountryCode": true,
  "CapabilitiesSupportsImplicitConsent": true,
  "CapabilitiesSupportsExplicitConsent": false,
  "ConsentOwner": "Salesforce",
  "EventCapabilitiesIsInboundAcknwOptionExposed": true,
  "EventCapabilitiesIsTypingIndicatorOptionHidden": false,
  "RoutingOwner": "Salesforce"
}
```

## Optional Configuration

Consider these optional tasks when creating the ConversationChannelDefinition Record:

- [Configure Consent Levels to Customize the Messaging Opt-In and Opt-Out Experience](/docs/service/messaging-partner/guide/configure-consent-levels.md)
- [Add Custom Icon](/docs/service/messaging-partner/guide/add-custom-icon.md)
- [Add Support for Custom Parameters](/docs/service/messaging-partner/guide/add-custom-objects.md)
- [Configure Inbound Acknowledgements and Outbound Typing Indicators](/docs/service/messaging-partner/guide/inbound-acknowledgements-typing-indicators.md)
- [Configure Agentforce Service Agent Progress Indicators](/docs/service/messaging-partner/guide/progress-indicators.md)
- [Add Multiple Participants to a Messaging Conference](/docs/service/messaging-partner/guide/conference.md)

**See Also**

- *Tooling API Guide*: [ConversationChannelDefinition](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_conversationchanneldefinition.htm)
- *Metadata API Guide*: [ConversationChannelDefinition](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_conversationchanneldefinition.htm)
- *Object Reference*: [ConversationChannelDefinition](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_conversationchanneldefinition.htm)
