SOLVED

Personal recomendations for lead from webhook

Go to solution
Highlighted

Personal recomendations for lead from webhook

We have a webhook that returns recomendations (1-3 for example) for each user when triggered.

Looks like i must create custom fields for each lead, where response will be stored.

How can I make dynanic block with different amount of cards based on webhook's response?

How to make this block more independent (like snippet) to use in different emails?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Level 10 - Community Moderator

Re: Personal recomendations for lead from webhook

Webhooks always map back to lead fields (in this case, one single field). Not to snippets. Velocity is far more powerful than any snippet.

You can clear the field with a Change Data Value if you want, but you might as well leave it until it gets changed again by the next webhook call.

View solution in original post

5 REPLIES 5
Highlighted
Level 10 - Community Moderator

Re: Personal recomendations for lead from webhook

Map stringified JSON back to a single Textarea field.

Parse that JSON back to a complex object in Velocity.

Highlighted
Level 5

Re: Personal recomendations for lead from webhook

^ This is the best way. Found the strategy on the Teknkl blog and now have 10-15 JSON fields.

https://blog.teknkl.com/marketo-json-fields-in-velocity/

The only thing I would add is Marketo webhooks can be pretty slow if you need to backfill or update a lot of records. You prob. don't need to worry about this unless you have a large system, but might be worth monitoring. If you have bulk data needs, the API might be another option.

Same JSON / Velocity approach in both setups.

Level 10 - Community Moderator

Re: Personal recomendations for lead from webhook

Got an update to that post coming, thanks for the reminder.

Highlighted

Re: Personal recomendations for lead from webhook

Thanks for reply.

But is there way to do it without Velocity only with Marketo GUI?

Can i get webhook response directly in some snippet without storing it in Lead's fields?

And if not how can i clear this fields after email was sent?

Highlighted
Level 10 - Community Moderator

Re: Personal recomendations for lead from webhook

Webhooks always map back to lead fields (in this case, one single field). Not to snippets. Velocity is far more powerful than any snippet.

You can clear the field with a Change Data Value if you want, but you might as well leave it until it gets changed again by the next webhook call.

View solution in original post