- Newest
- Most votes
- Most comments
Hello, I'm slightly late to the party here but we have exactly the same query and I'm stuck, did you eventually get this working? We can create / update records fine from AWS using the REST API Lambda but this does not work on the Voicecall object. I'm slightly loath to use the CTRDataSyncFunction function as I'm not keen on modifying the standard Lambdas.
The only thing I can think of is to create a Survey Case record type and use that. Ideally we could create a standard Salesforce survey but the object model is pretty complicated and "filling one in" programmatically doesn't even seem to be possible.
Hi Laura, A complete solution to deploy post-call survey was recently released on aws-samples.
Please see: https://github.com/aws-samples/amazon-connect-contact-surveys. Follow the documentation to deploy it.
This should be an excellent starting point to achieve this. Feel free to reach out if you need assistance, I happen to have created this solution ^_^.
Hi Aurelien, thanks for the reply and documentation. Unfortunately, it does not meet my needs as we want to pull the stored customer input from AWS/Connect into Salesforce, which is the CRM we use for cases. We do not want a separate survey set up in AWS.
Really, what I'm trying to figure out is:
- Which blocks do I set in my Connect contact flow(s)?
- Where do I set them in the flow?
- How are they configured?
- Do I link to existing lambda? Use another?
- How do I reference Stored Customer Input?
The goal is to get that stored customer input into Salesforce and onto the Voice Call Record that gets created.
I haven't had any luck customizing the CTR lambda code as I'm not sure how to reference the input within it.
I understand. In that case, you will need to use a combination of Store Customer Input and Invoke AWS Lambda Function to achieve your outcome. Store Customer Input will prompt your users with a given question and collect the answer. Once a customer has entered an input, you can access the last stored input through the system contact attribute "Stored customer input", which you can pass to you Lambda for processing.
It might be worth reaching out to your AWS Account Manager, they might be able to assist you in getting the help you would require.
Hi Ben - I did. It's a little fuzzy and some things have changed, so bear with me.
I created a self signed certificate and added it to Salesforce. Then I updated the environment variables/parameters in AWS Secrets Manager based on the certificate.
Since we set this up a few years ago, we use the connected app. Based on my documentation links, it looks like new implementations won't be able to use the connected app so I'm not sure how that would change any of this.
In our main inbound flow, the survey disconnect flow is set after we set the working queue. The survery flow gets customer input and then stores each value as a separate Set contact attributes box. Then I used the AWS Lambda function block to invoke my contact center's restApiFunction, set to synchronous. The input parameters of that block set the method to updateRecord, set the objectApiName to VoiceCall, then recordId is dynamically set to User defined voiceCallId and then I have the custom field I created in Salesforce on VCs as the last destination key that is dynamically user defined to the saved customer input.
Ultimately, I do not recall having to update the actual code of anything and my notes don't indicate I did. For us, it turned out that there was an issue on the Salesforce side that messed with the APIs that was eventually resolved by a major release. So, that was part of the hold up for us.
In terms of updating the certificate and keys - we've done that the same way each time: new certificate, update environment variables/parameters in AWS and save. Have not touched anything else.
I hope this helps? Let me know if I did not answer your question or you would like further clarification on anything.
Relevant content
- asked 2 years ago
- asked 4 months ago
- AWS OFFICIALUpdated 2 years ago

Hey! I meant to post my reply to you in this comment box but posted it as a separate comment. Posting here in case you don't get notified unless my comment is a direct reply.