Reference triggering program using a global smart campaign? | Community
Skip to main content
Jay_Jiang
Level 10
October 13, 2019
Question

Reference triggering program using a global smart campaign?

  • October 13, 2019
  • 2 replies
  • 4129 views

Using a global smart campaign, how can one reference the program ID and program name of the triggering program? (not the parent of the global smart campaign)

Right now I have a smart campaign in each program but I want to set up one global smart campaign listening for:

but if I add call webhook in the flow of this smart campaign, it won't reference the program that triggered it.

FYI, I have tried using "Campaign is requested" in the global smart campaign and request campaign in each of the other programs. This doesn't work either.

If I had to use pseudo code to explain it, I want...

$('program').find('[name^=SE] , [name^=VE]').changed(function(){
doSomething($(this));
});
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

SanfordWhiteman
Level 10
October 13, 2019

You're talking about some sort of forwarding of the original trigger context. Unfortunately, can't be done.

(Not sure JavaScript-type this is a good comparison, because this can be either lexical or call-site or non-modifiable/global!)

Justin_Norris1
Level 10
October 14, 2019

The work-around I would use in this scenario is to stamp the program-specific data values to person fields using Change Data Value then request the global smart campaign and reference those person fields in your subsequent actions. 

At least this still allows you to centralize the repetitive actions into a single global "service." 

SanfordWhiteman
Level 10
October 14, 2019

Sorta... but you've got a race condition.

Justin_Norris1
Level 10
October 14, 2019

Can you expand Sandy? 

Is it because the values from the CDV flow step are not guaranteed to be written to the database by the time they are referenced in the subsequent requested campaign?