Loading
Service
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Update Messaging Session with Alumni Details

          Update Messaging Session with Alumni Details

          When an alumnus contacts a service representative through chat, the service representative receives an incoming chat notification. To show the name of the alumnus in the notification, the messaging session record must contain the alumnus' account ID, contact ID, and full name. To update the messaging session record with these details, create an autolaunched flow and update the Omni-Channel flow.

          Required Editions

          View supported editions.
          User Permissions Needed
          To open, edit, or create a flow in Flow Builder: Manage Flow

          Create Autolaunched Flow to Update Messaging Session Record

          1. From Setup, in the Quick Find box, enter Flows, and select Flows.
          2. Create a New Flow.
          3. Select Start From Scratch, and click Next.
          4. Select Autolaunched Flow (No Trigger), and click Create.
          5. From the Manager tab in Toolbox, create these input variables: userId and routableId.
            The userId variable stores the user ID passed into the flow. The routableId stores the routable ID of messaging session record of the current messaging session.
          6. Add these Get Record elements to the flow: Get User, Get Contact, and Get Messaging Session.
          7. Add an Update Records element called Update Messaging Session.
          8. In the Get User element, use the user ID passed into the flow to get the alumnus' user record.
            1. In the Data Source section, select Salesforce Object.
            2. From the Object dropdown list, select User.
            3. From the Condition Requirements dropdown list, select All Conditions Are Met (AND).
            4. Add a condition to get a user record if the user ID is equal to the value stored in the userId variable.
            5. In the How Many Records to Store section, select Only the first record.
            6. In the How to Store Record Data section, select Automatically store all fields.
          9. In the Get Contact element, use the user record received from the Get User element to get the related contact record.
            1. In the Data Source section, select Salesforce Object.
            2. Select Contact in the Object dropdown list.
            3. Select All Conditions Are Met (AND) in the Condition Requirements dropdown list.
            4. Add a condition to get the related contact record if the contact ID is equal to the related contact ID of the user record stored in the User from Get User record variable.
            5. In the How Many Records to Store section, select Only the first record.
            6. In the How to Store Record Data section, select Automatically store all fields.
          10. In the Get Messaging Session element, use the routableID passed into the flow to get the current messaging session record.
            1. In the Data Source section, select Salesforce Object.
            2. From the Object dropdown list, select Messaging Session.
            3. From the Condition Requirements dropdown list, select All Conditions Are Met (AND).
            4. Add a condition to get a messaging session record if its ID is equal to the value stored in the routableId variable.
            5. In the How Many Records to Store section, select Only the first record.
            6. In the How to Store Record Data section, select Automatically store all fields.
          11. In the Update Messaging Session element, update the current messaging session record with the related contact record's contact ID, full name, and related account ID.
            1. In the How to Find Records to Update and Set Their Values section, select Specify conditions to identify records, and set fields individually.
            2. From the Object dropdown list, select Messaging User.
            3. From the Condition Requirements to Update Records dropdown list, select All Conditions Are Met (AND).
            4. Add a condition to get the messaging user record if its ID is equal to the related messaging user ID of the record stored in the Messaging Session from Get Messaging Session record variable.
            5. In the Set Field Values for the Messaging User Records section, set the AccountId field value to the ID of the account related to the record stored in the Contact from Get Contact record variable. Set the ContactId field value to the value stored in the Contact ID field of the Contact from Get Contact record variable. Set the Name field value to the value stored in the Full Name field of the Contact from Get Contact record variable.
          12. Activate the flow.

          Update Omni-Channel Flow for Embedded Messaging

          Return to the Omni-Channel flow that you created when you prepared a Salesforce org, and add the autolaunched flow as a subflow.

          1. From Setup, in the Quick Find box, enter Flows, and select Flows.
          2. From the list, find and select your previous Omni-Channel flow.
          3. Add a Subflow element after Start, and select the autolaunched flow that you previously created.
          4. Specify the label, API name, and description.
          5. Set input values for the autolaunched flow by passing the userID and recordID variable values from the Omni-Channel flow.
          6. Activate the flow.
            With this flow, a service representative sees the alumnus' account ID, contact ID, and full name in the messaging session record. The incoming chat notification shows the alumnus' name.
           
          Loading
          Salesforce Help | Article