- Newest
- Most votes
- Most comments
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:
-
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).
-
If a matching record is found, extract the AgentID from the Salesforce Voice Call record.
-
In your Amazon Connect contact flow, use a "Check contact attributes" block to determine if a recent agent interaction exists.
-
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.
-
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.
-
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.
-
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
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.
Relevant content
- asked a year ago