Loading
Agentforce Contact Center
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
          Route Inbound Calls to the Last Representative

          Route Inbound Calls to the Last Representative

          Maximize customer service continuity by automatically connecting callers with the specific human representative who most recently handled their case.

          Required Editions

          This article applies to:

          Salesforce Voice (Native Telephony)

          Available in: Agentforce Contact Center with Salesforce Voice
          Available in: Enterprise, Unlimited, and Developer Editions
          User Permissions Needed
          To manage media:

          Agentforce Contact Center Admin (Salesforce Voice) permission set.

          Learn how to view permissions in this permission set.

          Consider a high-priority support scenario where a customer interacts with a specialist on a complex technical resolution over several days. If they call back for an update, the system identifies that previous representative, verifies their online status, and routes the call directly to them to maintain the conversation thread.

          Procedure for Configuring Last Rep Routing

          1. From Setup, in the Quick Find box, enter Flows, and then select Flows.
          2. Click the Omni-channel flow you want to modify. To create a new omni-channel flow, follow these steps.
          3. Add a Play Prompt element to deliver a welcome message and configure these settings:
            • Label: Welcome
            • API Name: Welcome
            • Amount of Time: 1
            • Units: Days
            • Record ID: {!recordId}
            • Prompt Type: Message
            • Language: English (United States)
            • Voice Profile: Jennifer
            • Message: Welcome!

            If the audio plays, the flow follows the Completed path to retrieve call data. If the audio fails to play within the set limit, the Timed Out path serves as an error-handling route to ensure the caller proceeds through the flow.

          4. Add a Get Records element to identify the active voice call data and configure these settings:
            • Label: Get current voice call
            • API Name: Get_current_voice_call
            • Data Source: Salesforce Object
            • Object: Voice Call
            • Filter Voice Call Records Requirements: All Conditions Are Met (AND)
            • Field: Voice Call ID, Operator: Equals, Value: recordId
            • How many records to store: Only the first record
            • How to store record data: Automatically store all fields
          5. Add a Get Records element to fetch the caller's interaction history and configure these settings:
            • Label: Get prev voice call
            • API Name: Get_prev_voice_call
            • Data Source: Salesforce Object
            • Object: Voice Call
            • Filter Voice all Records Requirements: All Conditions Are Met (AND)
            • Field: Caller Contact Info, Operator: Equals, Value: Voice call from get current voice call > caller contact info
            • How many records to store: Only the first record
            • How to store record data: Automatically store all fields
            • Sort Voice Call Order: Descending
            • Sort By: CallEndDateTime
          6. Add Loop element to iterate the historical call collection and configure these settings:
            • Label: Get last voice handled by agent
            • API Name: Get_last_voice_handled_by_agent
            • Collection Variable: Voice Calls from Get prev voice call
            • Specify Direction for Iterating Over Collection: First item to last item
          7. Add a Decision element within the loop to filter the agents and configure these settings:
            • Label: Is Owner an Agent
            • API Name: Is_Owner_a_Agent
            • Select Decision Logic: Define Manually (Default)
            • Outcome Label: Owner is agent
            • Condition Requirements to Execute Outcome: All Conditions Are Met (AND)
            • Resource: Owner ID (User) > User ID, Operator: Starts With, Value: 005
            • Resource: Owner ID (User) > User ID, Operator: Does Not Equal, Value: 005SB00000TbVXBYA3
          8. Add an Assignment element to save the agent details to variables and configure these settings:
            • Label: Assign LAR
            • API Name: Assign_LAR
            • Set variable values: Variable: Last_handled_agent, Operator: Equals, Value: Owner ID (User) > User ID
            • Variable: LAR_agent_name, Operator: Equals, Value: Owner ID (User) > First Name
          9. Add a Play Prompt element to inform the caller that their previous representative is found. Configure these settings:
            • Label: LAR found in loop
            • API Name: LAR_found_in_loop
            • Amount of time: 1 Day
            • Record ID: {!recordId}
            • Prompt Type: Message
            • Language: English (United States)
            • Voice Profile: Jennifer
            • Message: Great !! I have found the last agent who handled your call. His name is Agent {!LAR_agent_name}
          10. Add a Decision element to verify if a representative is identified and configure these settings:
            • Label: Do we have a Last handled agent?
            • API Name: Do_we_have_Last_handled_agent
            • Select decision logic: Default Manual
            • Outcome Label: LAR found
            • Outcome API: LAR_found
            • Condition: All conditions are met (And)
            • Resource: Last_handeled_agent
            • Default Outcome Label: Default Outcome (No agent identified)

            The flow branches into two paths. If an agent is found, the system checks for online availability otherwise the flow routes the caller to the general queue.

          11. Save and Activate the flow.
           
          Loading
          Salesforce Help | Article