SOLVED

Re: Webhook Json Value Cutoff Issue

Go to solution
Keerthana_Shan1
Level 2

Webhook Json Value Cutoff Issue

Hi,

I am using webhook to call API, the problem is the URL value is cutting off if it contains '&' in it.

Example Json Template:

PersonId={{lead.Id:default=edit me}}&ContactCreated= {{lead.Created At:default=edit me}}&ContactModified= {{lead.Updated At:default=edit me}}&FormURL= {{lead.Form URL:default=edit me}}

URL value = https://www.abc.com/sampletext/?value1=xxxx&value2=yyy&value3=zzzz

In this URL, the value is cutting off after first Amberson occurs, like (https://www.abc.com/sampletext/?value1=xxxx).

Is there a solution to handle URL values.?

1 ACCEPTED SOLUTION

Accepted Solutions
Keerthana_Shan1
Level 2

Re: Webhook Json Value Cutoff Issue

Thanks Sanford.

Updated request encoding to Form/URL and template format with double quotes. It was working Fine.

View solution in original post

13 REPLIES 13
SanfordWhiteman
Level 10 - Community Moderator

Re: Webhook Json Value Cutoff Issue

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).

Keerthana_Shan1
Level 2

Re: Webhook Json Value Cutoff Issue

In webhook payload request we are having the correct url, but when the request payload is passed to API, the payload is converted into class(object) where the url is cut off after '&' (Amberson).

PFB the screenshot of webhook and activity log

pastedImage_1.png

pastedImage_2.png

SanfordWhiteman
Level 10 - Community Moderator

Re: Webhook Json Value Cutoff Issue

Set Request Encoding to Form/URL, not JSON. Your payload is clearly not JSON.

Keerthana_Shan1
Level 2

Re: Webhook Json Value Cutoff Issue

Thanks Sanford.

Updated request encoding to Form/URL and template format with double quotes. It was working Fine.

JD_Nelson
Level 10 - Community Advisor

Re: Webhook Json Value Cutoff Issue

don't you have to 'escape' the character in json?  I believe you just put /& instead?

SanfordWhiteman
Level 10 - Community Moderator

Re: Webhook Json Value Cutoff Issue

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).

JD_Nelson
Level 10 - Community Advisor

Re: Webhook Json Value Cutoff Issue

what about just using HTML? &   ?

SanfordWhiteman
Level 10 - Community Moderator

Re: Webhook Json Value Cutoff Issue

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.

Elizabeth_Rhode
Level 1

Re: Webhook Json Value Cutoff Issue

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.