{"id":3929,"date":"2019-10-31T10:38:22","date_gmt":"2019-10-31T10:38:22","guid":{"rendered":"https:\/\/staging.txtbox.in\/docs\/salesforce\/?post_type=lsvr_kba&#038;p=3929"},"modified":"2020-04-24T05:19:06","modified_gmt":"2020-04-24T05:19:06","slug":"unable-to-send-messages-using-custom-triggers","status":"publish","type":"lsvr_kba","link":"https:\/\/staging.txtbox.in\/docs\/salesforce\/knowledge-base\/unable-to-send-messages-using-custom-triggers\/","title":{"rendered":"Unable to Send Messages Using Custom Triggers"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\"><strong>Issue Scenario<\/strong><\/h3>\n\n\n\n<p>When the disableSMSOnTrigger value is set to 0 the SMS History records are created but do not reach the portal. Also when the &nbsp;disableSMSOnTrigger value is set to 1, the SMS History records are created but do not reach the portal<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\" \/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Possible Causes<\/strong><\/h3>\n\n\n\n<p>The possible reasons may cause this issue:<\/p>\n\n\n\n<p>\u2022If 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.<\/p>\n\n\n\n<p>\u2022The 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.<\/p>\n\n\n\n<p>\u2022If the disableSMSOnTrigger value is 1, then, the customer needs to perform the callout by themselves.<\/p>\n\n\n\n<hr class=\"wp-block-separator is-style-wide\" \/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Solution<\/strong><\/h3>\n\n\n\n<p>Follow the given procedure to resolve the issue:<\/p>\n\n\n\n<p>1.Schedule the SMS History record creation or add it as a job that can be queued.<br>Or<br>Perform the callout in the batch context and then create the SMS History record later with the\u00a0<strong>disableSMSonTrigger<\/strong>\u00a0value as 1.<\/p>\n\n\n\n<div class=\"c-alert-message\">\nThe disableSMSOnTrigger defines when the callout is being performed from our code.\n0 denotes that the callout will be perform by us and 1 denotes that the callout will be done using custom code by the customer.\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>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 &nbsp;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: \u2022If the disableSMSOnTrigger [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"lsvr_kba_cat":[497],"lsvr_kba_tag":[510,500],"class_list":["post-3929","lsvr_kba","type-lsvr_kba","status-publish","format-standard","hentry","lsvr_kba_cat-outgoing-message-issues","lsvr_kba_tag-unable-to-send-messages-using-custom-triggers","lsvr_kba_tag-troubleshooting"],"_links":{"self":[{"href":"https:\/\/staging.txtbox.in\/docs\/salesforce\/wp-json\/wp\/v2\/lsvr_kba\/3929","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.txtbox.in\/docs\/salesforce\/wp-json\/wp\/v2\/lsvr_kba"}],"about":[{"href":"https:\/\/staging.txtbox.in\/docs\/salesforce\/wp-json\/wp\/v2\/types\/lsvr_kba"}],"author":[{"embeddable":true,"href":"https:\/\/staging.txtbox.in\/docs\/salesforce\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.txtbox.in\/docs\/salesforce\/wp-json\/wp\/v2\/comments?post=3929"}],"version-history":[{"count":2,"href":"https:\/\/staging.txtbox.in\/docs\/salesforce\/wp-json\/wp\/v2\/lsvr_kba\/3929\/revisions"}],"predecessor-version":[{"id":3931,"href":"https:\/\/staging.txtbox.in\/docs\/salesforce\/wp-json\/wp\/v2\/lsvr_kba\/3929\/revisions\/3931"}],"wp:attachment":[{"href":"https:\/\/staging.txtbox.in\/docs\/salesforce\/wp-json\/wp\/v2\/media?parent=3929"}],"wp:term":[{"taxonomy":"lsvr_kba_cat","embeddable":true,"href":"https:\/\/staging.txtbox.in\/docs\/salesforce\/wp-json\/wp\/v2\/lsvr_kba_cat?post=3929"},{"taxonomy":"lsvr_kba_tag","embeddable":true,"href":"https:\/\/staging.txtbox.in\/docs\/salesforce\/wp-json\/wp\/v2\/lsvr_kba_tag?post=3929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}