question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do I get the contact id of a contact created by agent.connect()?

See original GitHub issue

When I call:

agent.connect(endpoint, {
   queueARN: QUEUE_ARN,
   success: function() { ... },
   failure: function() { ... }
});

How do I get the contact id of the dialed contact? The success callback doesn’t seem to include it.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
gituser5513commented, Feb 3, 2020

Is it safe to assume that when I call

agent.connect(endpoint, {
   queueARN: QUEUE_ARN,
   success: function() { ... },
   failure: function() { ... }
});

The next contact received by this method will be the one that was dialed?

connect.contact(function(contact) { ... });

Is there any chance of a race condition where the agent receives an inbound milliseconds after they call agent.connect() and thus the connect.contact() call returns the wrong contact?

0reactions
0-g-r-e-g-0commented, Feb 5, 2020

I do things a bit differently to you: I only call connect.contact() in my connect.agent() handler - not per call. So far I have no reports of failures to make calls from production agents. I have always assumed that we don’t get the contact in the success handler because it doesn’t exist yet. I only use the success handler to generate a log message. My guess is that the connect call only kicks off the process of setting up a new connection/contact after doing some basic checks. I never worried about it because it is a common model for CTI solutions: you instruct it to make a call, and a bit later you get one or more events that tell you that a call is in progress. I’ve seen this model used by 3 other CTI providers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Display contact information to the agent in the CCP
You can use contact attributes to capture information about the contact and then present it to the agent through the Contact Control Panel...
Read more >
amazon-connect-streams/Documentation.md at master
Amazon Connect Streams - a browser-based contact center integration API, ... ID and consuming Voice ID CTRs, or updating speaker ID in your...
Read more >
Amazon Connect softphone controls - Getting started
Locate the handlers for contact "onConnecting" (Look for the "handleContactConnecting()" function) and move the code that write the table to that handler (Code ......
Read more >
class Connect. Client - Boto3 Docs 1.26.40 documentation
Amazon Connect is a cloud-based contact center solution that you use to set up and manage a customer contact center and provide reliable...
Read more >
Contact Trace Record Import - Amazon Connect.github.io
Save the Set contact attributes block. · Wait approximately 2 minutes to give the contact flow time to publish. · Place a call,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found