Re: Token Edit Me Value Not replaced

Keerthana_Shan1
Level 2

Token Edit Me Value Not replaced

Hi Team,

Am using webhook to invoke my API, Input JSON contains many token values (default -  edit me). But these default tokens are not replaced with null value. No issues with brackets.

https://nation.marketo.com/community/product_and_support/blog/2016/10/21/fun-fact-fridaydefaultedit-...

Thanks.

10 REPLIES 10
Keerthana_Shan1
Level 2

Re: Token Edit Me Value Not replaced

Hi Team,

Kindly find the details below,

Webhook request type is JSON, it contains default value as "edit me" for all the token. The webhook was working fine till 2nd Aug 2019 but from 3rd Aug2019 we faced issue in JSON as edit me are not replace as null.

Existing working json contains double code for token values, after the edit me issue tried both with/without double quote request. Still null is not replaced in both the cases.

Sample JSON request:

PersonId={{lead.Id:default=edit me}}&emailaddress="{{lead.Email Address:default=edit me}}"&FirstName="{{lead.First Name:default=edit me}}"&LastName= "{{lead.Last Name:default=edit me}}"

Sample webhook output request:

PersonId=123&emailaddress="abc@gmail.com"&FirstName="edit me"&LastName= "edit me"&FullName= ""&Company= "edit me"

Thanks.

SanfordWhiteman
Level 10 - Community Moderator

Re: Token Edit Me Value Not replaced

That's not JSON.

It's form-URL-encoded with -- and this is very unusual, and generally wrong unless you've built a non-standard back end -- double-quoted values.

In any case, I'm not understanding your complaint. The output you show is exactly what you should expect if values are empty and you have included a default.

Keerthana_Shan1
Level 2

Re: Token Edit Me Value Not replaced

Thanks Sanford. Apologies for type, actually request type was Post, response type is JSON & request token encoding is Form-Url.

SanfordWhiteman
Level 10 - Community Moderator

Re: Token Edit Me Value Not replaced

OK, while that describes the encoding more accurately, I still don't understand what you expect. {{some.token:default=edit me]} is designed to output the string "edit me" as a fallback.

Keerthana_Shan1
Level 2

Re: Token Edit Me Value Not replaced

While inserting token in template field, we are leaving default value as empty, it automatically set "edit me" as default value in template. Till august we didn't face this edit me issue, the empty value are returned from webhook as empty. but from 3rd Aug only we are getting this edit me value from market webhook.

SanfordWhiteman
Level 10 - Community Moderator

Re: Token Edit Me Value Not replaced

The correct behavior is to show the fallback string. If you don't want the fallback, don't include it.

For as long as I can remember, inserting the token from the dropdown includes the fallback, so you have to delete it. This didn't start recently.

Lucas_Metherall
Level 4

Re: Token Edit Me Value Not replaced

Hi Sanford, 

To clarify, if I want to send an SMS that reads "Hi {{lead.First Name}}, blah blah blah" OR "Hi, blah blah blah"

and our webhook call reads; 

username=[redacted]&password=[redacted]&builderid=1164&PhoneNumber={{lead.Mobile Phone Number}}&PhoneMessage=Hi%20{{lead.First Name:default=friend,}}%20{{my.SMS Message}}&lookup_value={{lead.ID}}&mask=0419114341&method=mt

Do I edit the {{lead.First Name:default=friend,}} script to remove the default=friend?

*side note: I have been informed by our webhook receiving agency to URL encode everything, so there are no format issues. 

SanfordWhiteman
Level 10 - Community Moderator

Re: Token Edit Me Value Not replaced

Yes, you would go back and edit the inserted token. 

Lucas_Metherall
Level 4

Re: Token Edit Me Value Not replaced

Hi, 

so I ran a test through an email, which mirrors tha same function as the SMS. It looks like: Hi {{lead.First Name}}, and hits the inbox like: Hi ,

Is there a way to avoid that space while using first name token? Ideal output: an SMS that reads either Hi Sanford, OR, Hi,