- Newest
- Most votes
- Most comments
Based on the current architecture of Amazon Connect outbound campaigns, the Lambda function invoked in a Journey flow through a Custom action block is designed to process customer profiles and return results that determine campaign execution decisions within that Journey flow context. The data returned from this Lambda function is scoped to the Journey flow and does not automatically carry over to the Contact flow that executes when a customer answers the call.
The recommended approach for your use case would be to perform the API lookup for account summary data (balance, payment due, etc.) directly within the Contact flow itself rather than in the Journey flow. In your Contact flow, you can:
- Add an AWS Lambda function block that retrieves the customer data from your external API
- Use a Set contact attributes block after the Lambda function block to store the returned values as user-defined contact attributes
- Reference these attributes throughout your Contact flow to play personalized prompts
When configuring the Set contact attributes block, you would select "Use attribute" and choose "External" as the Type. Then map each attribute returned from your Lambda function (such as balance, payment due date, etc.) to destination keys that you can reference later in your flow for personalization.
This approach ensures that the account data is available within the Contact flow context where you need it for playing personalized prompts, rather than trying to pass data between the Journey flow and Contact flow contexts, which are separate execution environments.
Sources
Store a value from a Lambda functions as a contact attribute in Amazon Connect - Amazon Connect
Grant Amazon Connect access to your AWS Lambda functions - Amazon Connect
Invoke Lambda functions - Amazon Connect
Relevant content
- asked 8 months ago
- AWS OFFICIALUpdated 2 months ago
