Fdk method sendCommunicationSynchronously throws error

Hi Team,

We are trying to call the fdk method sendCommunicationSynchronously() in fynd java client to send communication updates to the user.

Payload:

{"payload":{"data":[{"otp":"1033","phone_number":"9682598183","country_code":"91"}],"sms":{"template":{"key":"object","value":{"name":"Send Otp JM Test","description":"Use this SMS template for verifying mobile number of customers, via a One-Time-Password.","priority":"high","published":true,"message":{"template":"{{otp}} is your One-Time Password, valid for 3 minutes only. Please do not share your OTP with anyone. Team JioMart","template_type":"nunjucks"},"template_id":"1107161893185950292","template_variables":{"otp":""}}},"provider":{"_id":"65b769ae63f5f96a158529f5"}},"application":"64b002e1386bae58f856f06d"}} 

Response:

{"success":false,"provider":"65b769ae63f5f96a158529f5","error":{"status":"FAILED","message":"Cannot read properties of null (reading 'provider')","timestamp":"2024-03-06T06:51:39.716Z"}}


Calling sendCommunicationAysnchronously() is getting us the following respone

{"success": true} 

but we are not receiving any comms for the same.

1 Like

Looks like either one of the value used here is incorrect for the deployment environment, you are trying…

“template_id”:“1107161893185950292”
“provider”:{“_id”:“65b769ae63f5f96a158529f5”

I am sure, communication. system team can revert back with the right values for these attributes

Hello @Jalees_Jahanzaib

As discussed, there is an issue with the provider ID. The sender ID used does not exist in either the platform or the database.

Upon checking, I could only find the following two sender IDs in the platform. Could you please try using them according to your use case?

65e85b220d0af2748555a23c
64f085e1080b77e6d6ca4377