Integrations

 View Only
  • 1.  Salesforce Chatter Post DREL error ideas?

    Adopter
    Posted 10-08-2021 13:39
    Hi everyone :)

    Does anyone have experience making chatter post destinations using answers from a form question? I am receiving errors when an answer contains either () or / within the answer. (I would prefer to allow the special characters instead of a validation message restricting them as this is a Customer Feedback form.)

    Execution Failure: Salesforce returned an error: [{"errorCode":"JSON_PARSER_ERROR","message":"Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value at [line:6, column:580]"}] (ID 32188845-d430-44e0-92a9-ccc3618e052f)

    Is there a way I can add quotations to %a[Improve] in the DREL document to allow () / characters in the answer so that Salesforce Chatter will accept it? Is it really as simple as "%a[Improve]"? I'm not sure if Salesforce would accept this though to allow the characters in the post...

    DREL example below:

    {
    "body" : {
    "messageSegments" : [
    {
    "type" : "Text",
    "text" : "Installation Completion Survey Returned. End user conversion rating of: %a[ConversionRate]. Additional feedback provided: %a[Improve]"
    }]
    },
    "feedElementType" : "FeedItem",
    "subjectId" : "%a[idRequestSFDCWO]"
    }


    Thank you!

    ------------------------------
    Lisa Zido
    Technical Systems Analyst
    GOJO Industries Inc.
    ------------------------------


  • 2.  RE: Salesforce Chatter Post DREL error ideas?

    Staff
    Posted 10-08-2021 15:11
    Edited by Adam Wallace 10-08-2021 16:02

    Hey Lisa,

    We might have to know a bit more about the answer data for %a[Improve] to give you the best advice. From the looks of it, it might be a text area question that contain line breaks, which will be formatted as \n in our answer data. In Salesforce, we would need to escape those with another backslash, so \\n. Let me know if I'm on the right track, then we can look further into how to get this payload formatted correctly.



    ------------------------------
    Adam Wallace
    Senior Support Engineer
    ProntoForms
    ------------------------------



  • 3.  RE: Salesforce Chatter Post DREL error ideas?

    Adopter
    Posted 10-08-2021 15:30
    Thank you! Yes this is a text area field that can have line breaks, and the error example I used did have line breaks. Are you saying the issue isn't with the special characters? Form ID: 18208878070.

    The customer enters their installation feedback in the Improve text area field and once submitted it tries to post this information on chatter and in a Salesforce case. The case is populated correctly but chatter will error out.

    ------------------------------
    Lisa Zido
    Technical Systems Analyst
    GOJO Industries Inc.
    ------------------------------



  • 4.  RE: Salesforce Chatter Post DREL error ideas?

    Staff
    Posted 10-13-2021 16:38
    Hi Lisa,

      As of right now, unfortunately you're going to have to go with a validation message as new lines and special characters are indeed getting in the way of a successful submission to Chatter.  I am, however, happy to let you know that our Engineering team is looking into what product changes may be needed to address this issue.  Sorry we don't have a better solution for you right now, but thanks for starting this thread. I'll post an update here with more info as I get it.

    Pat

    ------------------------------
    Pat Cooney
    Community Engineer
    ProntoForms
    community@prontoforms.com
    ------------------------------



  • 5.  RE: Salesforce Chatter Post DREL error ideas?

    Adopter
    Posted 10-21-2021 18:13
    Thanks Pat for the update! That is great to hear that the engineering team is looking into this, we really appreciate the ongoing support and product enhancements.

    ------------------------------
    Lisa Zido
    Technical Systems Analyst
    GOJO Industries Inc.
    ------------------------------



  • 6.  RE: Salesforce Chatter Post DREL error ideas?

    Staff
    Posted 10-28-2021 12:17

    Hi Lisa,

      I'm happy to report back that we've been able to make this improvement to our Data Destination feature.  The documentation on how to escape these special characters has been added to our production documentation: https://docs.prontoforms.com/1374411/Content/RevisedSalesforceIntegration/PostChatterWithSFApexREST.htm?Highlight=escapeJSON

      If you have any questions, definitely let us know!

    Pat



    ------------------------------
    Pat Cooney
    Community Engineer
    ProntoForms
    community@prontoforms.com
    ------------------------------



  • 7.  RE: Salesforce Chatter Post DREL error ideas?

    Adopter
    Posted 10-28-2021 17:07
    This is exciting news Pat! Thank you so much!! I implemented [#escapeJson] it in my chatter post destinations and re-executed the failures---this fixed it!! :) Thank you so so much for working on this for us!



    ------------------------------
    Lisa Zido
    Technical Systems Analyst
    GOJO Industries Inc.
    ------------------------------



Reminder: Content posted to our Community is public content.  Please be careful not to post Intellectual Property that you do not have permission to share.  For more information please refer to our Terms Of Use