zack.flowers | 2021-09-28 18:49:11 UTC | #1
I created an AWS Lambda function that contacts our on-premise CRM system and all it does is pass a Phone Number into said data action and retrieves the caller's account info from said phone number. Everything works in the test data action side of things. However, once I integrate this into a call flow, passing Call.ANI causes the data action to fail. However, if I manually input a phone number into said call flow, my data action succeeds.
Is there some kind of weird string parsing that I need to do? I've tried ToString(Call.ANI) and that didn't work (doesn't really make any sense for me to do ToString since it's already a string).
Here's my input contract (Pretty basic): { "type": "object", "required": [ "phoneNumber" ], "properties": { "phoneNumber": { "type": "string" } }, "additionalProperties": true }
Also, here's the Request Configuration. Removed the AWS ANI & our CRM URL just in case: { "requestUrlTemplate": "arn:aws:{AWSANI}", "requestType": "POST", "headers": {}, "requestTemplate": "{ \"url\": \"{CRMAPI_URL}\", \"method\": \"POST\", \"body\": {\"phoneNumber\": ${input.phoneNumber}}}" }
Noting I do not see any Lambda logs being generated from said failed calls.
zack.flowers | 2021-09-28 18:53:28 UTC | #2
Of course the one time I don't Google my issue.
I found the solution here: Call.ani does not work on data actions (entries) - Genesys Cloud Applications / Architect - Genesys Cloud Developer Forum
I replaced Call.ANI with ToPhoneNumber(Call.Ani).subscriberNumber
The string tel: on Call.ANI was breaking my API call :slight_smile:
system | 2021-10-29 18:54:09 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 12167