Skip to main content
About the Resource Center

Use Flow Builder to route Salesforce emails

Note: This article applies to Genesys Cloud for Salesforce.

After you configure the routing of Salesforce emails in Salesforce, create a flow in Salesforce using Flow Builder to automate the routing of Salesforce emails through Genesys Cloud for Salesforce. With Flow Builder, you can automate the complex process with a flow. 

A basic process for routing Salesforce emails requires two fields in the routing request: Queue or Inbound Email Flow and Salesforce Object ID (for screen pop). You can use more fields in the Flow Builder for advanced customization.

  1. In Salesforce, click Setup.
  2. Search for Flows in the Quick Find box and select Flows.
  3. Click New Flow.
  4. Select Record-Triggered Flow and click Create.
  5. Under Object, select Email Message.
  6. Under Trigger the Flow When, select A record is created.
  7. In the Set Entry Conditions section, select All Conditions Are Met (AND) as the condition requirements and add the following conditions:
    FieldOperatorValue
    IncomingEqualsTrue
    ParentIdIs NullFalse
  8. Click Done.
  9. In the Flow Builder, click the  icon to add an element.
  10. In the Add Element list, under Data, select Create Records.
  11. Under Label, enter Genesys Cloud Routing Request and select the following options for the record:
    • How Many Records to Create: One
    • How to Set the Records Fields: Use separate resources, and literal values
    • Object: Genesys Cloud Routing Request
  12. Add and set the field values for the Genesys Cloud routing request:

    FieldValue

    purecloud__Queue__c

    or

    purecloud__Inbound_Email_Flow__c

    Select a queue or an inbound email flow from the list.
    purecloud__Salesforce_Object_ID__c{!$Record.ParentId}
  13. Click Done.
  14. In the Flow Builder, click Save.
  15. Enter a name for the flow and click Save again.
  16. Click Activate.

The flow is now ready to use.