Add Support for Custom Parameters
Use parameters, parameter mappings, and flows to route custom data to Salesforce objects. For example, pass the name of a Messaging end user to the messaging session object using a flow.
-
To pass custom parameters in the API, set the
capabilitiesSupportsCustomChannelParametersfield totruein ConversationChannelDefinition. -
Ask your admin to use the guidance in Route Data to Objects in Bring Your Own Channel to take these steps. Their business needs will be different than those in the example, so the exact flow logic will differ.
-
The admin should create an Omni-Channel flow with a variable that’s used to route data to an object. For example, use a variable named
newEndUserNameto update the Name field of a Messaging User object. -
In Messaging Settings, the admin should create a custom parameter that matches the variable name in the Omni-Channel flow and add a parameter mapping for the custom parameter. For example, the admin creates a custom parameter named newEndUserName and maps it. When the admin creates the new parameter and mapping, ask them to note the Channel Variable Name and the Maximum Length.

-
-
To send a message while passing the parameter and its value to the object, make a call to the Interaction Service API. Choose the endpoint that matches your use case.
- If the messaging end user sends the first message in the conversation, call the Interactions API (
POST /api/v1/interactions). - If an AI agent sends the first message in the conversation through proactive messaging, call the Establish Conversation API (
POST /api/v1/conversation). - For either endpoint, use the
routingAttributesparameter to pass the key-value pair for the flow variable in the format"routingAttribute" : "key" : "value", wherekeyis the channel variable name in the parameter mapping, andvalueis the value. The value length must be less than or equal to the Maximum Length that the Salesforce admin set for the custom parameter in Messaging Settings.
In the sample payload, in
routingAttributesthe key is set tonewEndUserNamewhich is mapped to the inputnewEndUserNameparameter in Salesforce.Here is a sample payload for
POST /api/v1/interactions. - If the messaging end user sends the first message in the conversation, call the Interactions API (
See Also
- Salesforce Help: Route Data to Objects in Bring Your Own Channel
- Salesforce Help: Understand the Details of the Routing Lifecycle
- Interaction Service API
- GitHub: Interaction Service APIs