Storing Array as a Lead Field Value and using the values as a token in webhook

Anonymous
Not applicable

Storing Array as a Lead Field Value and using the values as a token in webhook

Hi All,

So I have created some custom fields in the marketo lead database against each lead.

For example - JobID

Some of these field are supposed to have an array of values against each lead.

For example -

Lead Name - Prabash

Lead ID - 34512

JobID - {3124, 2133, 4532, 2111}

How do you people suggest can this be achieved in marketo ?

Also, I have a webhook which takes in {{lead.JobID}} as a token to fetch back responses in XML format.

If the above mentioned is achievable, how can each of the values inside the array be passed into that webhook one by one (like a for loop) for every lead ?

[Trigger set to calling the webhook every time the JobID attribute's Data Value changes]

Thanks a lot !!

Prabash Rath

Babajob.com, Bangalore, India.

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Storing Array as a Lead Field Value and using the values as a token in webhook

It's almost eerie that I'm working on something similar on this very night!

But, from your description thus far, your task is simpler than mine.

If your webhook endpoint can itself keep track of the pointer (current array index) then store the value as a JSON array of values. JSON is a standard notation and more adaptable than, say, a comma-separated list. Send the JSON to the endpoint and have it iterate over the list before returning, and also have it store what index it last processed. Assuming the field is only appended to (not cleared) than there's no risk of reprocessing.

Anonymous
Not applicable

Re: Storing Array as a Lead Field Value and using the values as a token in webhook

Hi Sanford,

Thanks for the help !

I am stuck at a stage before the webhook call happens, that being, whether a custom lead field in marketo can accept arrays as data value.

Thank You, for the help.

Prabash Rath