Series: Set up CX Cloud, Digital and AI for Salesforce Service Cloud Voice

Create flows to route Experience and Email Experience objects

A flow in Salesforce automates the routing process. You use elements, connectors, and resources to build a flow. For more information, see Flows in the Salesforce documentation.

Create a flow to route the Experience and Email Experience objects through the queues created for the objects. 

  1. In Salesforce, create a flow using the Omni-Channel Flow template.
    1. On the Setup Home page, search for Flows in the Quick Find box and select Flows.
    2. Click New Flow.
    3. Click All + Templates, and then select Omni-Channel Flow.
    4. Click Create.
  2. Create the following resources of type Variable:
    • input_record – Record data type for the object Experience.
    • recordId – Text data type. 
      For more information, see recordId and input_record in the Salesforce documentation.
  3. Drag the Route Work action onto the canvas and enter the values for the new action:
    • Give the action a Label and API Name and optionally, a Description.
    • Under Set Input Values > RecordID Variable, select the recordId that you created in Step 2.
    • Select Genesys Cloud Messaging for Service Channel.
    • Select Queue for Route To.
    • Under Queue, choose Select Queue and select the queue that you created for the Experience object. For more information, see Create backup queue for the flows.
  4. Click Done.
  5. Click Save in the Flow Builder.
  6. Enter a name for the flow, for example, Route Messaging Experience to Queue and click Save.
  7. Click Activate in the Flow Builder.

  1. In Salesforce, create a flow using the Omni-Channel Flow template.
    1. On the Setup Home page, search for Flows in the Quick Find box and select Flows.
    2. Click New Flow.
    3. Select Record-Triggered Flow and click Create.
  2. Under Select Object, choose Experience from the list.
  3. Under Configure Trigger, select Trigger the Flow when a record is created.
  4. Under Set Entry Conditions, select All Conditions Are Met (AND) as the Condition Requirements.
  5. Set the following conditions:
    • Field –  Interaction Id
    • Operator – Is Null
    • Value – False
  6. Add a Subflow element after the Start step in the Flow.This image is a screenshot of adding a subflow in Salesforce Flow.
  7. In the New Subflow window, select the flow created previously to route the experience to the queue as the Referenced Flow.
  8. Enter a label name for the Subflow.
  9. Select to include the two input values – input_record and recordId.
  10. Click Done.
  11. Click Save in the flow builder.
  12. Enter a name for the flow, for example, Start Omni-Channel for a new Messaging Experience and click Save.
  13. Click Activate in the flow builder.

  1. In Salesforce, create a flow using the Omni-Channel Flow template.
    1. On the Setup Home page, search for Flows in the Quick Find box and select Flows.
    2. Click New Flow.
    3. Click All + Templates, and then select Omni-Channel Flow.
    4. Click Create.
  2. Create the following resources of type Variable:
    • input_record – Record data type for the object Email Experience.
    • recordId – Text data type. 
      For more information, see recordId and input_record in the Salesforce documentation.
  3. Drag the Route Work action onto the canvas and enter the values for the new action:
    • Give the action a Label and API Name and optionally, a Description.
    • Under Set Input Values, select Single for the number of work records to route.
    • Select the recordId variable that you had created.
    • Select Genesys Cloud Email for Service Channel.
    • Select Queue for Route To.
    • Under Queue, choose Select Queue and select the queue that you created previously for the Email Experience object. For more information, see Create backup queue for the flows.
  4. Click Done.
  5. Click Save in the flow builder.
  6. Enter a name for the flow, for example, Route Email Experience to Agent and click Save.
  7. Click Activate in the flow builder.

  1. In Salesforce, create a flow using the Omni-Channel Flow template.
    1. On the Setup Home page, search for Flows in the Quick Find box and select Flows.
    2. Click New Flow.
    3. Select Record-Triggered Flow and click Create.
  2. Under Select Object, choose Email Experience from the list.
  3. Under Configure Trigger, select Trigger the Flow when a record is created.
  4. Under Set Entry Conditions, select All Conditions Are Met (AND) as the Condition Requirements.
  5. Set the following conditions:
    • Field –  Interaction Id
    • Operator – Is Null
    • Value – False
  6. Add a Subflow element after the Start step in the Flow.This image is a screenshot of adding a subflow in Salesforce Flow.
  7. In the New Subflow window, select the flow created previously to route the email experience to the queue as the Referenced Flow.
  8. Enter a label name for the Subflow.
  9. Select to include the two input values – input_record and recordId.
  10. Click Done.
  11. Click Save in the flow builder.
  12. Enter a name for the flow, for example, Start Omni-Channel for a new Email Experience and click Save.
  13. Click Activate in the flow builder.