AWS connect create a task from API
Hi, The requirement is when we invoke CreateTaskContact API call on Amazon connects from Lambda using python boto 3 function "start_task_contact", Is there anyway way to pass a phone number as the value to the "Reference" attribute. So When the task reaches the agent, he can simply click on the phone number to make an outbound call? Currently, the "reference" attribute is only accepting URL as the type and valid URL as a value. Anything other than this is throwing an InvalidRequestException error.
Regards jo
Hi,
As per the API Guide, use the 'Attributes' to pass in phone number: https://docs.aws.amazon.com/connect/latest/APIReference/API_StartTaskContact.html#API_StartTaskContact_RequestSyntax
"Attributes": { "TripAdvisorScore" : "5 out of 5" , "PhoneNumber": "+44112233445566" },
Thx Dan
As per the documentation the only valid values for Type are **URL **and **ATTACHMENT **(https://docs.aws.amazon.com/connect/latest/APIReference/API_Reference.html). And attachment doesn't appear to be useful for anything currently.
The simplest way to achieve this would be to use the Streams API and create a custom CCP that displays the click to call link along side the CCP. You'd then use Dan's comment about attaching the PhoneNumber as an attribute for the number to use in the click to call.
I've thought of some other options, such as calling the StartOutboundVoiceContact API via the url, but they get pretty ugly pretty quickly.
Relevant questions
How to get Call Status(Connected, Busy, No answered & Ringing) from Amazon Connect Streams API?
asked 2 months agoCalling Private API from Lambda in VPC
Accepted Answerasked 2 years agoHTTP API - Invoke lambda alias
Accepted Answerasked 5 months agoWhen to invoke a lambda directly or via API Gateway
asked 6 months agoIs websocket api is protected by AWS WAF ?
asked 2 years agoAWS connect create a task from API
Accepted Answerasked 4 months agoError using the AWS Connect Streams API to create an outbound call leg for initiating a transfer: "QuotaExceededException: Cannot dial third party destination: The agent is at maximum capacity."
asked 2 months agoCalling on-prem Web API from AWS Lambda
Accepted Answerasked 3 months agoApiGateway Websocket API: async python Lambda function
asked 2 years agoIs it a good way to implement custom authorization logic(like an API call to validate header parameters) in Lambda Authorizers?
asked 2 months ago