Skip to content

Instantly share code, notes, and snippets.

@phm200
Created July 2, 2018 17:43
Show Gist options
  • Save phm200/4b6d572ae370b7187bdd544f0c94dc99 to your computer and use it in GitHub Desktop.
Save phm200/4b6d572ae370b7187bdd544f0c94dc99 to your computer and use it in GitHub Desktop.
Transfers via Amazon Connect Streams API
var agent = new lily.Agent();
agent.getEndpoints(agent.getAllQueueARNs(), {
success: function(data){
console.log("valid_queue_phone_agent_endpoints", data.endpoints, "You can transfer the call to any of these endpoints");
},
failure:function(){
console.log("failed")
}
});
agent.getContacts(lily.ContactType.VOICE)[0].addConnection(any_valid_queue_or_phone_or_agent_endpoint, {
success: function(data) {
alert("transfer success");
},
failure: function(data) {
alert("transfer failed");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment