Token value not resolved in Webhook

Jay00031987
Level 4

Token value not resolved in Webhook

I am using lead token in Webhook call when using POST method call. But the output provide NULL value but in lead is having data for that specific field which is not reflecting. it is specific to only one field which is string type. I have not faced such issue in any other Marketo account. This is very weird does someone know why this so or what will be root cause for this?

 

Jay
6 REPLIES 6
Navkirandeora
Level 2

Re: Token value not resolved in Webhook

⚠️ This post has been edited for accuracy by a moderator.

 

Certainly! If a specific lead token isn't resolving correctly in a webhook call, it could be due to various reasons. Here's a solution:

  1. Token Syntax: Ensure you're using the correct syntax for the token. The token should be represented as {{lead.FieldName}}, where "FieldName" is the API name of the lead field.

  2. Field Permissions: Make sure that the webhook has permission to access that specific field. Sometimes field permissions may vary between different Marketo accounts. EDIT: There’s no such thing as “permission to access a field” for the purposes of sending the field value in a webhook.

  3. Data Consistency: Although the field may have data, ensure that there are no leading or trailing spaces or any unusual characters which might be causing it to resolve as NULL.  EDIT: Untrimmed whitespace will never cause a field to appear to be empty. The opposite may be true, where a field you think is completely empty instead has whitespace characters.

  4. Webhook Configuration: Recheck your webhook's configuration settings. Sometimes, the POST method or headers might not be set up correctly to handle the token's data type, even if it's a string.

  5. Token Limitations: Marketo tokens have certain limitations in webhooks. If the string contains special characters, they may not be processed correctly. EDIT: This is absolutely false. All strings can be encoded in JSON or URL-encoded payloads.

  6. Logging and Debugging: If you have access to the server receiving the webhook, check the logs to see the exact payload being sent. This can give clues if the issue is on the sending (Marketo) side or the receiving side.

  7. Field Updates: If the field was recently modified or had its type changed, there might be inconsistencies in how the token is being interpreted. Ensure the field in question hasn't undergone recent significant changes.

  8. Consult Marketo Support: If you've verified everything and it's still not working, it might be a specific issue with your Marketo instance. Contact Marketo Support with specific details to get a deeper investigation.

Lastly, always ensure you're testing in a controlled environment, so there's no data corruption or overwriting.

Navkiran
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Token value not resolved in Webhook


  1. Field Permissions: Make sure that the webhook has permission to access that specific field. Sometimes field permissions may vary between different Marketo accounts.

 


Field Management allows users to block field updates from a given list of input sources, I don't you can block a specific asset (email, webhook, etc.) from accessing the lead data. 

 


  1. Data Consistency: Although the field may have data, ensure that there are no leading or trailing spaces or any unusual characters which might be causing it to resolve as NULL.


AFAIK, when used, the data in the person field is replaced as-is in the Webhook. There's an option for each field in the Field Management section that allows you to enable HTML encoding in emails when referenced through tokens, but that doesn't impact value in Webhook, and having a leading/trailing space shouldn't let the token resolve to a null value, IMHO.

 


@Navkirandeora wrote:

Certainly! If a specific lead token isn't resolving correctly in a webhook call, it could be due to various reasons. Here's a solution:

  1. Logging and Debugging: If you have access to the server receiving the webhook, check the logs to see the exact payload being sent. This can give clues if the issue is on the sending (Marketo) side or the receiving side.


Payload, URL, and the response back, etc. can also be checked in Marketo's Call Webhook activity log. See the snapshot below:

Darshil_Shah1_0-1694443596106.png

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Token value not resolved in Webhook

I hope you're referring to the correct person record in case you've duplicate test records in your system (happens more than you think). Also, if you're looking at the correct person record that has value for the specific person token used in the webhook, could you please share your webhook definition and the "Webhook Call" activity details so we can have a look? Please make sure you redact or mask any credentials/Authorization key from your snapshot.

SanfordWhiteman
Level 10 - Community Moderator

Re: Token value not resolved in Webhook


I am using lead token in Webhook call when using POST method call. But the output provide NULL value but in lead is having data for that specific field which is not reflecting.

I think you need to explain exactly what you mean by the 4 uppercase characters NULL.

 

In Marketo, the string “NULL” (without quotes) is a special keyword in Change Data Value flow steps — not everywhere — to empty the value. There’s no explicit set-to-empty option, so you set to the string “NULL” to accomplish the same result.

 

However, if you see the string “NULL” in an outbound webhook payload, that’s a sign that the value is literally those 4 characters. It’s not the empty string, and it’s not the special value database value null (which isn’t the same as the string “NULL”).

 

So please expand on the situation for us to give more targeted help.

Jay00031987
Level 4

Re: Token value not resolved in Webhook

I raised support ticket got below response

there are two fields with the same name in the backend which might have been synced with SFDC and merged into the existing field. 
Jay
Tags (1)
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Token value not resolved in Webhook

Okay, but does the value in the field (presumably NULL, though still not sure you're seeing an empty value or literal 4-character-long "NULL" string) you have referenced in the Webhook match with what you see in the Webhook? If the value matches, then all you have to do is update your webhook to reference the correct field. Also, you might just want to clone and update the webhook, as at times webhooks don't update, and they keep referencing the older config when called via the flow step.

 

Lastly, make sure you check the Used By of the duplicate field in case if it's mistakenly being used by other assets, if so you might need to update those assets so they reference the correct field instead. If you don't really need this duplicate field, you should also consider hiding it from the Field Management section.

Tags (1)