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

CTRDataSyncFunction - Won't process if Voicemail is left in 9.1 #21

Closed Semag closed 1 year ago

Semag commented 1 year ago

Hey all - I'm not sure if this is the right place to report this (I also have a Salesforce Ticket open) but I have been banging my head against the wall for a while trying to figure out why a bunch of our fields on voice calls weren't updating.

It turns out the new version of CTRDataSyncFunction has a commented line that says this:

      const isVM = ctr.Attributes && ctr.Attributes.vm_flag;
      **// if the ctr data sync has the Voicemail flag, no need to process it since the packager lambda will update the voicecall record**
      if (ctr.ContactId && !isVM) {
        const voiceCall = utils.transformCTR(ctr);

I moved our contact center back to the old version, but in this project i also noticed you have version 9.0 and not 9.1 in the project?

jinalkathiara commented 1 year ago

I added 9.1 version recently. We are not having tags in the github but if you see latest commits, you should be able to see 9.1 version. Sorry for the breakage and can you mention your salesforce support case # ? We can guide you and update our support org as well.

Regarding the issue you are talking about, can you elaborate more ?

Semag commented 1 year ago

Thanks for the reply @jinalkathiara - the 9.1 version of CTRDataSyncFunction that you have in this repository doesn't seem to be the same as the one that auto upgraded in our AWS instance.

Basically, the issue that we had is that after the upgrade on 8/9 in AWS, our VoiceCallRecords were no longer updating with callAttributes for all calls that resulted in a voicemail. I didn't quite recognize this as the symptom until I found the root cause today.

The reason that our voiceCallRecords are not updating, is that the newest version of handler.js in the CTRDataSyncFunction is literally checking to see if the call was a voicemail, and if so, it skips the update. I backed the version back down to the previous version and everything started working as it previously did.

@jinalkathiara sorry forgot to mention our Sforce case is 43479992

jinalkathiara commented 1 year ago

Created the PR to fix this issue and this issue should be fixed in the Contact center 10.0 https://github.com/service-cloud-voice/ServiceCloudVoiceLambdas/pull/23/files

Once you verify, you can close this issue.

jinalkathiara commented 1 year ago

Closing this issue.