Expand my Community achievements bar.

Is it possible to target alerts dynamically?

Avatar

Level 1

Hi

I am on Campaign Classic v7.

I want to send an alert to different users depending on rules defined in the workflow.

I have been able to select the relevant operators from the operators table, or to define the email address to be targeted in the workflow variables.

However, referencing the variable in Alert : Assignment Type : Filter doesn't seem to work (is there a way to do this? do I need to include some script in Alert :  Advanced Tab : Initialization script to pass this through?), and I can't feed selected operators into the alert to target them like a delivery.

I have one other idea which I am yet to test (selecting operators in the workflow, assigning them to a group in the workflow, targeting the group, then emptying the group before the workflow runs again) but wanted to check if there was an easier way.

Many Thanks

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Reply

Avatar

Community Advisor

Hello @StephenWa4,

you can dynamically set fitlers from advanced javascript tab. You can access conditions by

     /* 
     <alert.....
     <assigneeFilter humanCond="Query: name contains 'a'" schema="xtk:operator">
        <where displayFilter="name contains 'a'">
          <condition compositeKey="" dependkey="" enabledIf="" expr="@name LIKE '%' + 'a' + '%'"
                     internalId="4046128459"/>
        </where>
      </assigneeFilter>
      */

logError(activity.assigneeFilter.where.condition[0].expr)
//set
activity.assigneeFilter.where.condition[0].expr = 'your condition'
activity.assigneeFilter.where.condition[1].expr = 'your condition 2'
...

But in order it to work prepopulate the conditions you need then access them and change as needed. 

Or you would need to use XML functions to add / remove conditions 


and simply read or set them as you want

Marcel_Szimonisz_0-1736504004832.png