Unable to Send Messages Using Custom Triggers

Issue Scenario

When the disableSMSOnTrigger value is set to 0 the SMS History records are created but do not reach the portal. Also when the  disableSMSOnTrigger value is set to 1, the SMS History records are created but do not reach the portal


Possible Causes

The possible reasons may cause this issue:

•If the disableSMSOnTrigger value is 0, we have to conduct a check on all future call limits before sending out an SMS. This does not allow the SMS to be sent to the portal if future methods are exhausted for the request.

•The Trigger which creates the SMS History record is usually invoked from either a batch or a future method. This results in 0 limits for future method invocations of the SMSUtility code request.

•If the disableSMSOnTrigger value is 1, then, the customer needs to perform the callout by themselves.


Solution

Follow the given procedure to resolve the issue:

1.Schedule the SMS History record creation or add it as a job that can be queued.
Or
Perform the callout in the batch context and then create the SMS History record later with the disableSMSonTrigger value as 1.

The disableSMSOnTrigger defines when the callout is being performed from our code. 0 denotes that the callout will be perform by us and 1 denotes that the callout will be done using custom code by the customer.

Was This Article Helpful?

Important Announcement!

URGENT! Please register the 10-digit business phone number (e.g. 555-555-5555) that your organization uses to send texts to consumers in the U.S. Failure to register may cause heavy penalties and disruption to all your text messaging communications.