1 Answer
- Newest
- Most votes
- Most comments
0
To route chats to a specific agent based on their agent ID in Amazon Connect, you need to adjust your routing criteria structure. The issue with your current implementation is that you're using "UserIdCondition" which isn't the correct format for agent-specific routing.
Here's how to properly structure your routing criteria:
{
"RoutingCriteria": {
"Steps": [
{
"Expression": {
"AttributeCondition": {
"ComparisonOperator": "Match",
"MatchCriteria": {
"AgentsCriteria": {
"AgentIds": ["user_id_here"]
}
}
}
},
"Expiry": {
"DurationInSeconds": 60
}
},
{
"Expression": {
"AttributeCondition": {
"Name": "Language",
"Value": "English",
"ProficiencyLevel": 1,
"ComparisonOperator": "NumberGreaterOrEqualTo"
}
}
}
]
}
}
Key changes to note:
- The top-level key should be "RoutingCriteria" not "MyRoutingCriteria"
- For agent-specific routing, use "AttributeCondition" with "ComparisonOperator": "Match" and "MatchCriteria" containing "AgentsCriteria"
- The agent ID should be in an array under "AgentIds"
For the requirement to route returning customers to the same agent within 4 hours, you'll need to:
- Store the customer-agent pairing in a database (like DynamoDB)
- Use a Lambda function to check if the customer has interacted with an agent in the last 4 hours
- If found, retrieve that agent ID and use it in your routing criteria
- If not found, proceed with your default routing logic
Remember that the agent must be in Available status and have the queue the contact is in assigned to their Routing Profile to receive the contact.
Sources
UpdateContactRoutingData - Amazon Connect
Route contacts to the last agent the customer interacted with on an outbound call. | AWS re:Post
answered 9 months ago
Relevant content
- asked 9 months ago
