$.External Attributes
Key value pairs returned by a Lambda invoke block in Connect. Only available after the Lambda runs successfully. Persist until another Lambda is invoked in the flow. If the Lambda errors
$.Attributes
Contact attributes already stored on the contact. Set by Set Contact Attributes blocks
Storing a Lambda ARN vs Invoking It
Storing an ARN in a Set Contact Attributes block just saves the ARN string as text on the contact. It does not execute the Lambda. You need an Invoke Lambda block to actually call it. Common pattern is to store ARNs early in the flow so modules can reference them dynamically later.
STRING_MAP Response Validation
Setting on a Lambda invoke block that tells Connect to expect a flat key value map where every value is a string. If any value in the Lambda response is undefined or null
Set Contact Attributes Block
Block that writes key value pairs to the contact. Can read from $.External (Lambda response)
Contact Attribute Overwrite Risk
Any Set Contact Attributes block in any flow or module can overwrite any user defined attribute. There is no protection. If a downstream module writes AccountName = empty it wipes whatever an earlier flow set. Hard to catch without tracing the full path in CloudWatch logs.
CultureCode Branching
Pattern where a Check Contact Attributes block reads the CultureCode attribute and branches the contact to different paths based on language. Each language path (en-US
HostedWidget Attributes
Participant attributes passed in by the chat widget through the StartChatContact API. Available as $.Attributes.HostedWidget-* before the first block in the flow runs. Not set by any block in the flow. Includes accountId
HostedWidget-accountId
The AccountId passed by the chat widget when the customer starts a chat. Identifies which client or brand the customer is chatting from. Available immediately on contact initiation before any flow block runs.
HostedWidget-culture
The language and culture code passed by the chat widget. Values like en-US
Account Lookup Pattern
Lambda invoke block takes AccountId as input and queries DynamoDB by AccountId and Dnis = Chat. Returns account config including AccountName. A Set Contact Attributes block then maps the Lambda response from $.External to user defined contact attributes so the values persist in the CTR.
Pre-Branch Lookup Placement
Account lookup should happen before any language or region branching in the flow. If the lookup is inside a specific branch like en-GB only
Connect Flow Logs
CloudWatch log entries that show block by block execution of a Connect flow. Each entry includes contact ID
Lambda Logs vs Flow Logs
Lambda logs show what happened inside the Lambda function including input
Contact Trace Record (CTR)
Record generated for every completed contact. Contains all contact attributes
PathLog Attribute
A user defined attribute that logs the path a contact takes through flow modules. Each entry is a module or decision point. Useful for tracing where a contact entered
ConfigurationByDNIS Lambda
Lambda designed for voice contacts. Looks up account config by DNIS (phone number). For chat contacts there is no phone number so it may return empty results. Used in voice path and some UK modules. Different from configurationByAccountId which uses AccountId.
configurationByAccountId Lambda
Lambda that takes AccountId as input and queries a DynamoDB table by AccountID-index where Dnis = Chat. Returns AccountName and full account config including RoutingType
DynamoDB Table Name as Environment Variable
Lambda functions store their target DynamoDB table name as an environment variable usually called DYNAMODB_TABLE_NAME. Check this in the Lambda console under Configuration then Environment variables to find which table the Lambda reads from.
Test Chat Tool in Connect
Built-in testing tool under Channels in the Connect console. Allows setting the Contact Flow and Contact Attributes as JSON to simulate a real chat. Useful when hosted widget URLs are not accessible in lower environments like qa1.
Test Chat Contact Attributes Format
Flat JSON object with key value pairs. Simulates widget attributes. Example: {“HostedWidget-accountId”:”ff464f63”
Before and After Testing Pattern
Revert to old flow and run a test to get a CTR confirming broken behavior (before record). Publish the fix and run the same test with same settings to get a CTR confirming the fix (after record). Timestamps prove which flow version generated each result.
Lambda Null Check Bug Pattern
When Lambda code accesses a property on a value that might be undefined without checking first. Example: currentPageURL.indexOf(“/wize-chat”) crashes with TypeError if currentPageURL is undefined. Always check for null or undefined before calling methods on variables.
Error Handling for Optional Lambda Invokes
Wire the error output of the Lambda invoke block to the same next block as the success output. If the Lambda fails the flow continues normally. The optional attribute like AccountName stays null but the chat is not broken for the customer.