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.

  1. To pass custom parameters in the API, set the capabilitiesSupportsCustomChannelParameters field to true in ConversationChannelDefinition.

  2. 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 newEndUserName to 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.

      Note Channel Variable Name in new parameter

  3. To send a message while passing the parameter and its value to the object, make a call to the Interaction Service Interactions API (POST /api/v1/interactions). Use the routingAttributes parameter to pass the key-value pair for the flow variable in the format "routingAttribute" : "key" : "value", where key is the channel variable name in the parameter mapping, and value is the value.

    In the sample payload, in routingAttributes the key is set to newEndUserName which is mapped to the input newEndUserName parameter in Salesforce.

    Here is a sample payload for POST /api/v1/interactions.

See Also