[Solved] Knowing when a Salesforce Action insert has failed

0

Hello,

I’ve created a form that submits data to Salesforce then emails the person with the PDF of their submission.

I’ve had an isolated incident where the Salesforce insert failed (because of high traffic volume), but the email was still sent. Is there a way for the form to know if the Salesforce insert failed (e.g. saving the resulting Salesforce ID in a Hidden Value and using logic to direct the user to a different Thank-you page?)

Best wishes,

Rob

Dominic Sharpe selected answer

    Best answer

    0

    Hi Rob,

    This sounds like it should be possible, but have not necessarily tried this myself. I believe you can place the merge code for the Salesforce Insert Action in a Hidden Value (keep in mind that this Hidden Value will need to be on a page that follows the Salesforce action). This merge code should then populate with the record ID after the Salesforce action fires.

    Assuming that the Hidden Value populates with the ID if the insert works, you could then use logic to see if the Hidden Value ‘is answered’ or not to send the user to a different page or trigger/not trigger the email.

    It may be worthwhile to reach out to SurveyGizmo Support to if you need direct troubleshooting:

    https://help.surveygizmo.com/help/surveygizmo-support-hours

    Hope this helps!

    RobH commented
      • Hi Dominic,

        Thanks for you answer. I gave it a try and it was able to store the response using a Lua script

        setvalue(“MyHiddenValueAlias”,getvalue(“MySalesforceActionAlias”))

        This stored the ID of the created Salesforce record in the hidden value.

        When testing I noticed there was a few minutes delay before SurveyGizmo showed the value in the Individual Responses for the form.

        Best wishes,

        Rob

      ×

      Login

      Question stats

      • Active
      • Views530 times
      • Answers1 answer
      • Followers1 follower