Route contacts to the last agent the customer interacted with on an outbound call.

0

Hi Team, I am using Salesforce Service Cloud Voice with Amazon Connect and have a business scenario where inbound contacts should be routed directly to the last agent who interacted with the contact via an outbound call within the past 1 day. If that agent is unavailable, misses the contact, or if no agent is found within the 1-day window, the contact should be routed to a predefined inbound queue. How should I configure the mapping of the Set Working Queue block attributes to dynamically find the agent who last interacted with the customer on an outbound call. We do have a Voice Call record created in salesforce for each inbound and outbound call which captures the AgentID as an attribute. Thank you!"

asked 2 months ago84 views
2 Answers
0

To route contacts to the last agent who interacted with the customer on an outbound call within the past day, you'll need to set up a custom routing flow in Amazon Connect that integrates with your Salesforce data. Here's how you can approach this:

  1. Create a Lambda function or use Amazon Connect's integration with Salesforce to query the Voice Call records in Salesforce. This function should look for the most recent outbound call record within the last 24 hours for the incoming contact (based on the customer's phone number or other identifier).

  2. If a matching record is found, extract the AgentID from the Salesforce Voice Call record.

  3. In your Amazon Connect contact flow, use a "Check contact attributes" block to determine if a recent agent interaction exists.

  4. If an agent is found, use the "Set routing criteria" block to set a preferred agent based on the AgentID retrieved from Salesforce. This will attempt to route the contact to that specific agent.

  5. After the "Set routing criteria" block, use a "Transfer to queue" block. This ensures that if the preferred agent is unavailable, the contact will still be routed to other agents in the queue.

  6. If no recent agent interaction is found, or if the preferred agent is unavailable, the contact will automatically be routed to your predefined inbound queue.

  7. Ensure that your routing profile for the agents includes both their personal queue (for direct routing) and the general inbound queue.

This approach allows you to prioritize routing to the last agent who interacted with the customer, while still providing a fallback to the general queue if needed. Remember to test your flow thoroughly to ensure it behaves as expected in all scenarios.
Sources
Set up contact transfers in Amazon Connect - Amazon Connect
Flow block in Amazon Connect: Set routing criteria - Amazon Connect
Amazon Connect launches the ability to preferentially route contacts to specific agents within a queue - AWS

profile picture
answered 2 months ago
0

Hello,

You can refer to the above-mentioned steps, or the following approaches can also be followed:

Using the Set routing criteria flow block with Customer Profiles Last agent identifier. However, this would require setting up customer profiles.

Or use DynamoDB to store combinations of phone numbers with agent IDs and use Lambda with your Contact Flows to store and fetch these combinations.

AWS
SUPPORT ENGINEER
answered 2 months ago
profile pictureAWS
EXPERT
reviewed 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions