Configure Partner-Owned Routing and Consent

Routing and consent levels can be managed through the Salesforce system or the partner system.

To manage routing and consent levels through the Salesforce system:

  1. Set ConversationChannelDefinition.consentOwner to Salesforce.
  2. Set ConversationChannelDefinition.routingOwner to Salesforce and ConversationChannelDefinition.supportsKeywords to true.
  3. After the admin installs and sets up Bring Your Own Channel in their org, they can navigate to the Messaging Settings page in Salesforce Lightning to configure the routing and consent level details.

To manage routing and consent levels through the partner system:

  1. Set ConversationChannelDefinition.consentOwner to Partner.
  2. Set ConversationChannelDefinition.routingOwner to Partner and ConversationChannelDefinition.supportsKeywords to false.
  3. Perform the API calls in the order listed:
    • Call the Interaction API (POST /api/v1/interactions) to create a conversation messaging session and a messagingEndUser record.
    • Call the Consent API (PATCH /api/v1/consent) and set the consent level (consentStatus) for the user. For example, “consentStatus” : “ExplicityOptedIn”
    • Call the Route API (POST /api/v1/route) to generate a Pending Service Routing (PSR) record in Salesforce.
    • Call the agentWork API (POST /api/v1/agentWork) to create an AgentWork record when the system finds a potential agent to handle the work item.
    • Call the Route API (DELETE /api/v1/route) to delete the Pending Service Routing (PSR) record. Only call this API if the PSR isn’t automatically deleted.

See Also