Can you use API trigger values within action conditions of API-triggered broadcast's?

  • 30 March 2023
  • 2 replies

So what I’m trying to do is build an API-triggered broadcast, which for example sends this payload here upon triggering:


I then want to trigger a message to all users who:

  • Performed a specific event, let’s say “Buy fruit”.
  • The “type” of the “Buy fruit” event matches the value of trigger.fruit.

So in the end you would have something like:


Is this possible within; or is there a better way to do this ? As an additional note, the actual usecase will consist in five different trigger attributes by which I aim to filter the recipients of the broadcast’s message, so using user segments is not an option, as this would in result in tons and tons of segments for all possible combinations of the five different fruit attributes (like the fruit’s type, size, date, expiry, and price, as an example).


Thanks in advance for any help!


Best answer by Penny 31 March 2023, 10:25

View original

2 replies

Userlevel 4

Hey Emaildev,

I think (please correct me if I am wrong) what you are searching for is not an API-triggered broadcast (one-to-many) but an event-triggered campaign.

There are a couple of options you have:

Event data filter in trigger

When setting up the trigger (of the campaign) you filter by event attributes. This however, might not be practically for you because you would have to set up one campaign for each event attribute.


Multi split in workflow

You could also use a multi split in which you define the values of the event attribute.


Personalize the email with event attributes

You can send everyone the same email and personalize based on the event attribute.



Hope that helps,


Userlevel 4

Hey there,

For API triggered broadcasts, the {{}} can only be used within the message itself via Liquid. At the moment it isn’t possible to use this within the campaign logic (in an action condition for example).

At the same time, {{event.attribute}} can only be referenced in an event-triggered campaign as well. 

So I’m afraid this might not be quite possible at the moment. 


You could consider building an event-triggered campaign based on the event Buy Fruit. With the campaign workflow, you could use a multi-split branch for each fruit type. From there, you can continue to use multi-split branches to further delineate based on the size, date, etc. 


Alternatively, for each fruit type you could build a singular email, and use Liquid and event attributes of the fruit size/price, etc to personalise the emails accordingly. :)