SOLVED

Re: Trigger on Query String Contains Program ID

Go to solution
akhandoker_tm
Level 2

Trigger on Query String Contains Program ID

Is it possible to create a trigger for [Fills Out Form] with a [Querystring] constraint that if the query string contains {{program.id}}? Or do triggers have trouble activating based on fields and tokens? I tested this a few ways to Sunday with no activation of the trigger and I'm starting to think that {{program.id}} doesn't populate in time or at all for the trigger to activate but, I wanted to confirm if I've missed a process or solution to make this work as intended.

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Trigger on Query String Contains Program ID

{{program.id}} is an inherent property of the Program. It's always available, there's no race condition like what you're describing.

The cause is far broader: you can never compare field values with tokens in a Smart List. The only way to do what you're attempting here is with the assistance of a webhook-compatible service that can compare the values you send in the payload.

(Though if your goal is to associate a global form fillout with a program based on a query param, and you have such a service, you don't need to worry about the comparison. Just have the service add the person to the program with that ID.)

View solution in original post

6 REPLIES 6
SanfordWhiteman
Level 10 - Community Moderator

Re: Trigger on Query String Contains Program ID

{{program.id}} is an inherent property of the Program. It's always available, there's no race condition like what you're describing.

The cause is far broader: you can never compare field values with tokens in a Smart List. The only way to do what you're attempting here is with the assistance of a webhook-compatible service that can compare the values you send in the payload.

(Though if your goal is to associate a global form fillout with a program based on a query param, and you have such a service, you don't need to worry about the comparison. Just have the service add the person to the program with that ID.)

akhandoker_tm
Level 2

Re: Trigger on Query String Contains Program ID

Ah, I see. Thanks for the insight as always. Sounds like we'll have to continue with just putting in the program ID by hand. Definitely not the end of the world.

jsiebert
Level 4

Re: Trigger on Query String Contains Program ID

I would consider catching the Program ID querystring in your forms by creating a hidden string field that pulls from the URL parameter and using the data value change for that field as a trigger.

Jack Siebert
SanfordWhiteman
Level 10 - Community Moderator

Re: Trigger on Query String Contains Program ID

That leaves you in basically the same boat, though. You need a condition for every possible program ID, just like if you use query string [contains].

jsiebert
Level 4

Re: Trigger on Query String Contains Program ID

@SanfordWhiteman You're right. I was under the impression that the ask was for the trigger to fire on ANY form fillout with a Program ID attached to it. But the querystring makes much more sense for that scenario as well 😋

Jack Siebert
akhandoker_tm
Level 2

Re: Trigger on Query String Contains Program ID

Good catch, though, Jack! That's, actually, what we're doing currently. The current workflow is:

  1. Create program
  2. Copy ID from URL
  3. Add ID as query string value
  4. Activate trigger

I was hoping to make a first-world, quality-of-life improvement-workflow of:

  1. Create program
  2. Activate trigger
  3. Get promotion