service-cloud-voice / ServiceCloudVoiceLambdas

This application provides a set of Lambda functions, which are available within your Amazon Connect instance after provisioning the instance with your Service Cloud Voice contact center. You can use these Lambdas in Amazon Connect contact flows.
BSD 3-Clause "New" or "Revised" License
14 stars 18 forks source link

invokeTelephonyIntegrationApi.executeOmniflow fails after 10.0 update #25

Closed iberever closed 1 year ago

iberever commented 1 year ago

This change in 10.0 in https://github.com/service-cloud-voice/ServiceCloudVoiceLambdas/blob/2017940e0b859c8dd01e6b13aa13bdfe449ec265/invokeTelephonyIntegrationApi/handler.js#L115-L116

is causing the call to be made to the SF API with /voiceCall/undefined/omniFlow.

The === check is too restrictive as if no parameter is sent, the variable would be undefined, not null. Best choice is to check for a falsy value instead.

like so:

const contactIdParam = contactId || event.Details.ContactData.ContactId;
jinalkathiara commented 1 year ago

Fixed in the 10.1 version, We will release 11.0 version which should have this fix.