Extract Customer ID from Twilio
This section provides the information on how to extract the customer-id from the Twilio contact event metadata.
uassist.env – Twilio properties
ACR_TWILIO_CUSTOM_DATA_MAP=customerUniqueId=$.UniqueCustomerId:^(.*?)$:NA
The ACR_TWILIO_CUSTOM_DATA_MAP can accommodate configurations for multiple custom-meta-data fields separated by comma “,”
Example: customerUniqueId=$.UniqueCustomerId:^(.*?)$:NA, customerName=$.custName:^(.*?)$:NA
In LHS of the configuration, customerUniqueId denotes the key name under which the value is stored internally in Uniphore.
In RHS of the configuration, $.UniqueCustomerId denotes the JSON path in Contact Metadata JSON which points to the corresponding key name which stores the required custom-meta-data.
In RHS, ^(.*?)$ denotes the regex pattern for extracting the customerUniqueId from the metadata.
In RHS, NA denotes the default value which should be considered only when the parameter key is not configured.
Twilio Contact Event Metadata
{ "organizationId": "1", "agentClientId": "agent-001", "agentId": "0", "stage": "start", "customerId": "customer-001", "tenantId": "1", "sessionId": "call-001", "type": "tape", "recid": "call-001", "customerClientId": "customer-001", "categoryId": "1", "localparty": "local", "hostname": "platform.test.com", "UniqueCustomerId": "John Doe" }