By using AWS re:Post, you agree to the Terms of Use
/Amazon Connect/

Questions tagged with Amazon Connect

Sort by most recent
  • 1
  • 90 / page

Browse through the questions and answers listed below or filter and sort to narrow down your results.

No further functionality after "eventType": "INITIATED" message while implementing Amazon Connect high-volume outbound communications

I have just created Campaign in Connect with Contact flow, Then IAM policies, EventBridge and Pinpoint stuff with Creation of Segments & Journeys and in return i got the first event as "eventType": "INITIATED" with Type "VOICE". But then it stuck and nothing happen, it should dial a number using outbound queue as mention in the [Documentation](https://aws.amazon.com/blogs/contact-center/make-predictive-and-progressive-calls-using-amazon-connect-high-volume-outbound-communications/#:~:text=Under%20%E2%80%9COutbound%20call%20configuration%E2%80%9D%2C%20choose%20any%20phone%20number%20for,button%20at%20the%20top%2Dright.) as below: ``` { "version": "0", "id": "35af9eb2-5dda-fafc-48ce-78f223478a85", "detail-type": "Amazon Connect Contact Event", "source": "aws.connect", "account": "XXX92XXX3XXX", "time": "2022-05-31T08:21:52Z", "region": "us-east-1", "resources": [ "arn:aws:connect:us-east-1:XXX92XXX3XXX:instance/8XXXXXX9-1XXa-4XXf-bXXf-3XXXXXXXXX4", "arn:aws:connect:us-east-1:XXX92XXX3XXX:instance/8XXXXXX9-1XXa-4XXf-bXXf-3XXXXXXXXX4/contact/7b552ed3-b276-42ea-9837-31f8622f4fde" ], "detail": { "initiationTimestamp": "2022-05-31T08:21:52.769Z", "contactId": "7b552ed3-b276-42ea-9837-31f8622f4fde", "channel": "VOICE", "instanceArn": "arn:aws:connect:us-east-1:XXX92XXX3XXX:instance/8XXXXXX9-1XXa-4XXf-bXXf-3XXXXXXXXX4", "initiationMethod": "API", "eventType": "INITIATED", "campaign": { "campaignId": "8b00b16f-b083-4a00-ae86-58332f524b2b" } } } ``` In the end after the time ends it closed the journey with message "Message Not Sent". It should dial an outbound number at numbers added through segment and than return the events but somehow it doesn't working. In CSV segment file what format we have to used for phone number? e.g. General! when we add E.164 phone in CSV file and saved it, it throw an alert `"some features in your workbook might be lost if you save it as csv UTF-8 (comma delimited)"`. May be its changing the format.
1
answers
0
votes
30
views
asked a month ago

How can we pass one Lambda function's event to another lambda?

I am using AWS Lambda function in AWS Connect Contact Flow. I am invoking one lambda function from another lambda function. I want to pass my Invoker lambda function's event to second lambda function. My first lambda is receiving an event from Contact Flow but I want to call the second Lambda function by passing same event. Is there any way to use same event for my second lambda function. My first lambda function's event looks like this: ``` {'Details': {'ContactData': {'Attributes': {}, 'Channel': 'VOICE', 'ContactId': '7417-dc-45a-8213-e6eb0c68343c', 'CustomerEndpoint': {'Address': '+187737', 'Type': 'TELEPHONE_NUMBER'}, 'CustomerId': None, 'Description': None, 'InitialContactId': '74-456a-8213-e6eb343c', 'InitiationMethod': 'OUTBOUND', 'InstanceARN': 'arn:aws:connect:eu-central-1:048600317115:instance/ba4b5110-72fd-4511321-e8b2f', 'LanguageCode': 'en-US', 'MediaStreams': {'Customer': {'Audio': None}}, 'Name': None, 'PreviousContactId': '745585577-d37c-456a-8213-e0c68343c', 'Queue': {'ARN': 'arn:aws:connect:eu-central-1:04654567115:instance/ba4b5110-72fd-451b-a94d-a5b3555552f/queue/22555551-3b99-47ed-9cab-5a026122e56e', 'Name': 'outboundQueue', 'OutboundCallerId': {'Address': '+31205555689', 'Type': 'TELEPHONE_NUMBER'}}, 'References': {}, 'SystemEndpoint': {'Address': '+31205522559', 'Type': 'TELEPHONE_NUMBER'}}, 'Parameters': {'sf_fields': 'Id, Name, account.City_CB__c', 'sf_operation': 'phoneLookup', 'sf_phone': '.+4915959595195'}}, 'Name': 'ContactFlowEvent'} ``` How I can call second lambda function with the same event? How I can achieve this?
2
answers
0
votes
60
views
asked a month ago

Lambda Function returned an error in Connect Contact Flow logs, but Lambda itself working fine

I have set up a configuration between Salesforce and AWS Connect. In this configuration Amazon provided us with built-in Lambda package that is used to add, update or lookup Salesforce records. In my case, I am using this lambda package for lookup into salesforce. Salesforce save data in the form of Contact and Account. When I try to fetch data from Salesforce Contact using lambda function in Connect Contact Flow, it works absolutely fine. But when I try to fetch Salesforce Account fields using Lambda function in Connect Contact Flow, It is not working. Although Connect Contact Flow properly calls my lambda function, and Lambda function is working fine as you can see my lambda function logs below: ``` Response: { "searchRecords": [ { "attributes": { "type": "Contact", "url": "/services/data/v48.0/sobjects/Contact/0035pWFcaAAG" }, "Id": "0035p00003dWFcaAAG", "Name": "Artur Bensch", "Account": { "attributes": { "type": "Account", "url": "/services/data/v48.0/sobjects/Account/0015p000OcQAAV" }, "City_CB__c": "Cologne" } }, { "attributes": { "type": "Contact", "url": "/services/data/v48.0/sobjects/Contact/0035p000xtxAAA" }, "Id": "0035p000txAAA", "Name": "test us", "Account": { "attributes": { "type": "Account", "url": "/services/data/v48.0/sobjects/Account/0015p00ts3SAAQ" }, "City_CB__c": "Berlin" } } ] } ``` It is not throwing any error, I have checked all logs very carefully, but when I see contact flow logs, it says "The Lambda Function Returned An Error." Also you can see in the Contact Flow logs. ``` { "Results": "The Lambda Function Returned An Error.", "ContactId": "ab679f96-a75f-4fdfc-8sdfds0-a656542e2f8", "ContactFlowId": "arn:aws:connect:eu-central-1:048600317115:instance/ba40-72b-a94d-a5b3bfde8b2f/contact-flow/b8fb79cc", "ContactFlowName": "outboundWhisperFlow", "ContactFlowModuleType": "InvokeExternalResource", "Timestamp": "2022-05-30T06:43:58.108Z", "Parameters": { "FunctionArn": "arn:aws:lambda:eu-central-1:048600317115:function:serverlessrepo-AmazonConnectSalesforce-sfInvokeAPI-JrqDuYg", "Parameters": { "sf_operation": "phoneLookup", "sf_phone": ".+4915251121195", "sf_fields": "Id, Name, account.City_CB__c" }, "TimeLimit": "8000" } } ``` It is very unexpected behavior by Contact Flow logs, because my Lambda function is running without any error then why contact flow is saying Lambda Function returned an error, it is very frustrating.
2
answers
0
votes
25
views
asked a month ago

How to make/access call recordings filenames

When we add enable Call Recording Behavior in contact flow the call recording files are pushed & stored in S3 with `contactId_timestamp.wav` format file. We can get the contactId using Amazon connect stream API `getContactId()` event. I want to get the recordings of every call after call completed so to get the recordings from S3 i need to pass the key as filename in getObject Api. So, i am trying to automate this in my code as after every single call it will fetch/pull the call recording and add it in my call activity, the same procedural we are experiencing in `Search Contact Flow` as after every call we get a audio file. How to get the timestamp to make and access the call recording files by names? So far i what i have done is: -Used getObject Api to get/downloading the recording by filename. ``` require("dotenv").config(); const expres = require("express"); const app = expres(); app.listen(3001); const aws = require("aws-sdk"); const multer = require("multer"); const multerS3 = require("multer-s3"); aws.config.update({ secretAccessKey: process.env.ACCESS_SECRET, accessKeyId: process.env.ACCESS_KEY, region: process.env.REGION }) const BUCKET = process.env.BUCKET const s3 = new aws.S3(secretAccessKey = process.env.ACCESS_SECRET, accessKeyId = process.env.ACCESS_KEY); app.get("/download/filename", async(req, res)=>{ const filename = req.params.filename let x = await s3.getObject({Bucket:BUCKET, Key:filename}).promise(); res.send(x.Body); }) ```
1
answers
0
votes
25
views
asked 3 months ago

Getting an undefined variable message when calling Lambda function from Connect

I'm calling the code block below from Connect. I receive an error variable is undefined. Within connect when I test using the JSON { "key1": "654321" } The code works properly From Connect the calling block is set up Function = alias of the Lambda function Function input parameters: Use attribute Destination key: key1 type: system Attribute: Customer ID To me, it appears that the Parameters being passed in the Connect JSON string are correct. Any help as to why the data is not being parsed properly when sent through Connect would be greatly appreciated Logs show valid data being passed to the function { "Results": "The Lambda Function Returned An Error.", "ContactId": "e56bdf6c-923d-49d8-", "ContactFlowId": "arn:aws:connect:us-west-2:507182563096:instance/0cb6a294-6586-4aa3-b7cc-2b0f1516e0df/contact-fl", "ContactFlowName": "Connect-VoiceID-CareGiver-Contact-Flow_15", "ContactFlowModuleType": "InvokeExternalResource", "Timestamp": "2022-04-03T21:19:58.785Z", "ExternalResults": { "value": "707777", "attribute": "cid" }, "Parameters": { "FunctionArn": "arn:aws:lambda:us-west-2:507182563096:function:RHCS-VID-SMS", "Parameters": { "key1": "707777" }, "TimeLimit": "3000" } } Connect log shows: Lambda log shows : INFO UI = undefined const AWS = require('aws-sdk'); exports.handler = async (event) => { console.log("UI = " + event.key1); AWS.config.update({region: 'us-west-2'}); var params = { Message: 'DHCS-CG01|' + event.key1, PhoneNumber: '+19999999999' }; // Create promise and SNS service object var publishTextPromise = new AWS.SNS({apiVersion: '2010-03-31'}).publish(params).promise(); return new Promise((resolve, reject) => { // Handle promise's fulfilled/rejected states publishTextPromise.then((data) => { console.log("MessageID is " + data.MessageId); const response = { statusCode: 200, headers: { "Content-Type": "application/json" }, body: JSON.stringify(data) }; console.log('Server response function'); resolve(response); }).catch((error) => { reject(Error(error)); }); });
4
answers
0
votes
31
views
asked 3 months ago
  • 1
  • 90 / page