SOLVED

Re: Batch Token Update via API

Go to solution
kagill16
Level 2

Batch Token Update via API

We currently have an email in our Marketo instance that is all text tokens that has content updated via the API through the Campaign Request call. However, all of these emails are processed as individual API calls. As we have daily API call limits, and it also takes longer processing to do this individually, which means scaling the send numbers for this in Marketo are limited. Trying to find a way to batch these API calls. I have found some previous posts in regards to exporting the data out of Marketo but not as far as pushing the dynamic content into emails via tokens with the API. 

Please let me know if there is any additional context I need to provide. Thank you in advance!

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Batch Token Update via API

Like Darshil says, you can’t get any bulk-ier with runtime {{my.tokens}} than you already have with Request Campaign. Those “disappearing tokens” can’t be loaded as person fields, because then they wouldn’t be disappearing.

 

What I’d like to hear is exactly what kind of thing you’re using this functionality for. What content exactly differs per-send? What makes it unsuitable for (for example) Custom Objects?

View solution in original post

4 REPLIES 4
Darshil_Shah1
Level 10 - Community Advisor

Re: Batch Token Update via API

There isn't a way to bulk update the custom tokens (like you could do for the people, custom objects, and program members in Marketo) -if you wish to do a bulk update, you'd want to move away from referencing the custom tokens in emails to one of the attributes that are supported for updates via the bulk APIs - i.e., person, program member, or custom objects. You could always group people with the same token values together and make a single API call for them (max of 100 lead ids could be passed in the trigger campaign API endpoint), but then I believe it'd not be a transactional email send, i.e.,  in most cases, users want to trigger the email right away with the overridden token values passed via API (you'd face a similar issue with the bulk APIs as well, i.e., you'd need to tradeoff urgency of email send with the API calls required). Are you okay with the emails not being sent immediately so you're able to wait for people with the same token values to collect and then make a single trigger campaign API call? If you're okay, then you could also consider the bulk import API options as well- update the data nightly, and send them the email at one fixed time of the day/week/etc. I'd love to hear what others in the community recommend as well.

SanfordWhiteman
Level 10 - Community Moderator

Re: Batch Token Update via API

Like Darshil says, you can’t get any bulk-ier with runtime {{my.tokens}} than you already have with Request Campaign. Those “disappearing tokens” can’t be loaded as person fields, because then they wouldn’t be disappearing.

 

What I’d like to hear is exactly what kind of thing you’re using this functionality for. What content exactly differs per-send? What makes it unsuitable for (for example) Custom Objects?

kagill16
Level 2

Re: Batch Token Update via API

Thank you Darshil and Sanford for your responses!

 

We are currently using this for a performance snapshot email where all the values in the tokens will differ from person to person, displaying things such as unique page views for that contact. There are 63 token values that we are importing per person and each is a unique value. The data is pushed into Marketo through an SQS queue, aggregating multiple data sources. 

 

Thank you for the suggestion on using a custom object. We are going to begin discovery on this to validate if this will work for our use case. The limitations of course being the 50 field limit per CO, however may look into increasing the cap on our instance.

 

Thank you again!

SanfordWhiteman
Level 10 - Community Moderator

Re: Batch Token Update via API

No need to alter the limit. Surely you can pack the data into a Textarea field as JSON (which Velocity can unpack).