Webhook is Called - Response Contains: {{program.id}} or {{my.tokens}}? | Community
Skip to main content
March 9, 2017
Question

Webhook is Called - Response Contains: {{program.id}} or {{my.tokens}}?

  • March 9, 2017
  • 3 replies
  • 4640 views

Should the following "webhook is called" trigger work? Can I use tokens – either {{my.tokens}} or {{program.id}} tokens – here?

I want to add a campaign under a template program I'm building that will look for the {{program.id}} in the response and send an alert if it's there.

It's not part of the response yet, so I tried testing by using a {{my.token}} that contains a piece of the response that's already there. ("SUCCESS".)

The webhook was called and contained "SUCCESS" in the response, but no alert was sent. When I just substituted the actual text into the field – where {{program.id}} appears in the above image – it sent the alert, but not when I used a {{my.token}} that contained that same string.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

SanfordWhiteman
Level 10
March 9, 2017

Yeah, tokens don't work here AFAIK.

March 9, 2017

Thanks, Sanford! Always the first to help!

So what's the best way to address this? The webhook returns a response, and if it contains a certain string, I want Marketo to take an action. (Send an alert to the owner of the program.)

Dan_Stevens_
Level 10
March 9, 2017

Osman, you can't use tokens at all in triggers/filters within smart lists of smart campaigns.

Allow the use of tokens within Smart Lists of Smart Campaigns

Tokens on Steroïds

Grégoire_Miche2
Level 10
March 9, 2017

Hi Osman,

there quite a few ideas in the community about the possibility to use tokens as filter and constraints parameters.

I once listed all the token enhancements that would be nice to get here: and this one is in the list.

-Greg

March 9, 2017

Thanks, Dan! Thanks, Greg! Nice to have all the sharpest minds in the room.

Any suggestions on how we might address this?

We've already built an external application that keeps tabs on the number of event registrants and closes registrations when we've reached capacity.

Maybe we'll just have that program send the notification? Bit of a bummer because I thought we could have Marketo do that, but if there's no other option...

SanfordWhiteman
Level 10
March 9, 2017

Much as I love Webhook is Called, it doesn't have direct knowledge of the program context so it doesn't really work as a fully global trigger.

So you have a couple of options:

[1] Have the webhook response contain the program info (echoed from {{program.tokens}}).  Write them to a reusable lead field.  Then send a tokenized email picking up those tokens. This applies if you're trying to send email to program members (not really clear to whom you're sending the notification).

[2] If you're trying to send an alert to the de facto Program Owner, have a Resource Lead serve as that owner.  Pass all your Resource Leads through scheduled batch campaigns to check limits. Each lead only represents a single program so there will be no confusion about who/how to notify.

[3] Have program-specific Smart Campaigns (if you have a template program this becomes part of the scaffolding).

March 10, 2017

Hi Osman ,

If you provide more token of program like {{program.status}} , {{program.type}},{{program.starttime}},{{program.endtime}} . means while creating webhook only {{program.id}},{{program.name}},{{program.description}} is there , so you will provide more token , then it is useful for webhook triggering .

Thanks

Anil Kumar Nayak

SanfordWhiteman
Level 10
March 10, 2017

None of this makes a global trigger aware of the Program context.