- Più recenti
- Maggior numero di voti
- Maggior numero di commenti
I would caution to do this as the call will keep sending to this agent if this person is the only one around but stepped out. This will also cause a lot of routing decision rules to break if you are checking if there are any agents available to take calls before putting the call in queue.
There is a downside to use Stream API if the browser crashed as it changed to missed.
Another way to do this is monitoring Agent Event Stream, for Agent State to be MISSED. A new API has been made to resolve this DismissUserContact:
https://docs.aws.amazon.com/connect/latest/APIReference/API_DismissUserContact.html
in the Agent Event Stream you will get both the contactID and the AgentID which is what you need to set the agent back.
Again, not something you should do unless you know the agent condition and environment through some telemetry check of your agent physical status potentially through their headset if it give telemetry data like Jabra
If an agent has Desk phone configured to ring their cell phone and miss a call, then they have to log into Amazon Connect and click Close contact in the soft phone before they can receive another call. To get around this, use a Lambda function to close those contacts. In a Flow, Check staffing for Status: Available. If it is False, then Invoke AWS Lambda Function to dismiss contacts.
import { ConnectClient, DismissUserContactCommand, GetCurrentUserDataCommand } from "@aws-sdk/client-connect";
const connectInstanceId = 'YOUR_AMAZON_CONNECT_INSTANCE_ID';
const client = new ConnectClient();
export const handler = async(event) => {
let numDismissed = 0;
try {
let data = await client.send(
new GetCurrentUserDataCommand({
Filters: {
ContactFilter: {
ContactStates: [
'MISSED', 'ERROR', 'ENDED', 'REJECTED'
]
},
Queues: ['YOUR_QUEUE_ARN'],
},
InstanceId: connectInstanceId
})
);
for (const user of data.UserDataList) {
for (const contact of user.Contacts) {
await client.send(
new DismissUserContactCommand({
ContactId: contact.ContactId,
InstanceId: connectInstanceId,
UserId: user.User.Id
})
);
numDismissed++;
}
}
} catch (err) {
console.log("Error", err);
}
const response = {
statusCode: 200,
body: JSON.stringify(`Contacts Closed: ${numDismissed}`)
};
return response;
};
Contenuto pertinente
- AWS UFFICIALEAggiornata 3 anni fa
- AWS UFFICIALEAggiornata 2 anni fa
- AWS UFFICIALEAggiornata 3 anni fa
Hello,
To automatically set to available from Missed state on CCP, unfortunately this feature is not available as of now in naive or default CCP in Amazon Connect.
As a workaround, you can leverage custom CCP to achieve this requirement:
agent.onStateChange()
Using the above method, every time the agent state changes, the CCP will fetch the current state and if the current state is "Missed call", the CCP will change the state back to Available using the agent.setState() / agent.setStatus() method.
a)agent.onStateChange() [+]https://github.com/amazon-connect/amazon-connect-streams/blob/master/Documentation.md#agentonstatechange
b)agent.setState() / agent.setStatus() [+]https://github.com/amazon-connect/amazon-connect-streams/blob/master/Documentation.md#agentsetstate--agentsetstatus