-
Re: Webhook Json Value Cutoff Issue
Sanford Whiteman Jan 5, 2018 12:07 AM (in response to Keerthana Shanmugam)Please show screenshots of
- the full webhook definition (in Admin)
- the activity detail (click the activity ID to open the detail) for the Call Webhook activity in a lead's Activity Log
Make sure to capture the entire popup in the screenshot (expand or scroll as necessary).
-
Re: Webhook Json Value Cutoff Issue
Keerthana Shanmugam Jan 5, 2018 2:51 AM (in response to Sanford Whiteman)-
Re: Webhook Json Value Cutoff Issue
Sanford Whiteman Jan 5, 2018 7:59 AM (in response to Keerthana Shanmugam)1 of 1 people found this helpfulSet Request Encoding to Form/URL, not JSON. Your payload is clearly not JSON.
-
Re: Webhook Json Value Cutoff Issue
Keerthana Shanmugam Jan 8, 2018 1:30 AM (in response to Sanford Whiteman)Thanks Sanford.
Updated request encoding to Form/URL and template format with double quotes. It was working Fine.
-
-
Re: Webhook Json Value Cutoff Issue
JD NelsonJan 5, 2018 8:50 AM (in response to Keerthana Shanmugam)
don't you have to 'escape' the character in json? I believe you just put /& instead?
-
Re: Webhook Json Value Cutoff Issue
Sanford Whiteman Jan 5, 2018 8:52 AM (in response to JD Nelson)You don't have to escape "&" in JSON. It's not JSON, though. It's being passed as Form/Url encoding (much like a query string).
-
Re: Webhook Json Value Cutoff Issue
JD NelsonJan 5, 2018 9:59 AM (in response to Sanford Whiteman)
what about just using HTML? & ?
-
Re: Webhook Json Value Cutoff Issue
Sanford Whiteman Jan 5, 2018 11:23 AM (in response to JD Nelson)Nope, not relevant in URL (URI) encoding. URL encoded ampersand is %26, but you should never be doing this yourself, just choose Form/Url in the webhook setup.
-
Re: Webhook Json Value Cutoff Issue
Elizabeth Rhoden Jan 31, 2018 2:41 PM (in response to Sanford Whiteman)Question - I also have this same issue and changed the Set Request Encoding to Form/URL. The webhook failed and caused and error. I see there is mention of "double quotes" in the template area. Is this needed and if so, where exactly are these to be placed? Around what sections of the template code? Can someone post an example for me, please? Thanks.
-
Re: Webhook Json Value Cutoff Issue
Sanford Whiteman Jan 31, 2018 2:46 PM (in response to Elizabeth Rhoden)There's no one way to do this; it depends on what format/encoding the remote service (that the webhook connects to) supports.
What service are you calling?
If you post screenshots of the Activity Log Details (click the ActLog item ID, the first column) that will also show what you're sending and receiving.
-
Re: Webhook Json Value Cutoff Issue
Elizabeth Rhoden Feb 1, 2018 9:37 AM (in response to Sanford Whiteman)Its a RESTful wesbservice using JSON. However Marketo is converting & in the company field. I saw that a someone mentioned using double quotatons in the template area on the webhook. Just wondered exactly where that should be placed. Here is a screenshot of our template area on the webhook. Would I just need to add quotations to everything that already has quotations in the code below?
-
Re: Webhook Json Value Cutoff Issue
Sanford Whiteman Feb 1, 2018 10:08 AM (in response to Elizabeth Rhoden)The payload you're showing here isn't a JSON (application/json) payload.
It's a Form/Url (x-www-form-urlencoded) payload that happens to have a single field (order) that contains stringified and URL-encoded JSON.
As such, you can't simply choose JSON as the request token encoding because the entire JSON block needs to be URL-encoded to transport data without error.
For example, if order is
{ "OrderHeader" : { "CustomerID" : "xxx" } }
then this is passed as
https://endpoint.example.com/username=VER&order=%7B%22OrderHeader%22%3A%7B%22CustomerID%22%3A%22xxx%22%7D%7D
You can't do this in a single step. You need to pass the fields to a separate 'hook and get back a single pre-JSON-encoded block, which you then store in a textarea field. Then you send that {{lead.textarea field}} in the payload to your real service, now using Form/Url encoding.
-
Re: Webhook Json Value Cutoff Issue
Elizabeth Rhoden Feb 1, 2018 12:03 PM (in response to Sanford Whiteman)Thank you for your response and help on this. Sorry, if I am confusing in any way. Just trying to gain an understanding here because I think the solution is very close at hand . The 3rd party we are sending the webhook to has requested we URL encode the fields to accept special characters. So, if I change the encoding to Form/URL that should fix it, right? Or is something else needed in addition to the template code? Thanks again!
-
-
-
-
-
-
-
-
-
-