Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Agent ARN from the Connect Stream. #70

Closed
vdineshmca opened this issue May 31, 2018 · 10 comments
Closed

Get Agent ARN from the Connect Stream. #70

vdineshmca opened this issue May 31, 2018 · 10 comments

Comments

@vdineshmca
Copy link

Hi,

We know the 'Username' we are retrieving with help of agent.getConfiguration().username using the Connect Stream.

Similarly, Is there any way to retrieve the Agent ARN through the Connect Stream?

@ninjamike54
Copy link

There isn't currently, but we're aware of the need and are already tracking it on our side.

@krittylor
Copy link

Hi @ninjamike54 , is there any update on this issue? 🤔

@CiscoKidxx
Copy link

Any update on this issue?

@ctwomblyamzn
Copy link
Collaborator

Sorry for the long wait time. We are still tracking this issue on our end.

@intptr-t
Copy link

I have an alternative that until the official API will be released.

The Sample agent event stream says that the "name" of the agent queue is null.

This queue has a name of "null" because it's an agent queue, and agent queues don't have names.

And the ID part of the agent queue is the same as the agent's ID.(For now...)

const AGENT_QUEUE_PATTERN = new RegExp('arn:aws:connect:([\\w|\\-]+):(\\w+):instance/([\\w|\\-]+)/queue/agent/([\\w|\\-]+)');

connect.agent((agent) => {
  const agentQueue = agent.getConfiguration().routingProfile.queues.filter(queue => queue.name === null)
  // group[0] all
  // group[1] region
  // group[2] AWS AccountID
  // group[3] Amazon Connect InstanceID
  // group[4] AgentID
  const groups = AGENT_QUEUE_PATTERN.exec(agentQueue[0].queueARN);
  const agentArn = `arn:aws:connect:${groups[1]}:${groups[2]}:instance/${groups[3]}/agent/${groups[4]}`;

  console.log(agentArn);
}

@syJSdev
Copy link

syJSdev commented May 12, 2023

I can get the agentArn with getConfiguration() method.
image
But I can't see it in the index.d.ts file of amazon-connect-stream.
image

amazon-connect-stream: v2.4.7

@syJSdev
Copy link

syJSdev commented May 12, 2023

Also, for all Ids such as queueId and contactId, It's actually Arn.
image

@gjesse
Copy link

gjesse commented Aug 30, 2023

Can we get this fixed? can't understand why this has been open for 5 years now.

@seiyako
Copy link
Contributor

seiyako commented Jan 5, 2024

agentARN should be always present in the object returned from agent.getConfiguration(). It'd be appreciated if you could share the repro steps for the empty agentARN scenario.
Meanwhile, let us fix the typing issue.

@hngan
Copy link
Contributor

hngan commented Jan 23, 2024

getAgentARN API has been added to the newest update in Streams!

https://github.com/amazon-connect/amazon-connect-streams/releases/tag/v2.13.1

@hngan hngan closed this as completed Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants