Is it possible to target alerts dynamically? | Community
Skip to main content
January 9, 2025
Solved

Is it possible to target alerts dynamically?

  • January 9, 2025
  • 1 reply
  • 620 views

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

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

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

 

1 reply

Marcel_Szimonisz
Community Advisor
Marcel_SzimoniszCommunity AdvisorAccepted solution
Community Advisor
January 10, 2025

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