The title pretty much says what we want to reach.
Example:
- There’s an event ‘Invitation’ that you send to customer.io.
- That event holds an ‘invitees’ attribute, holding the customer.io ‘id’ identifiers as array.
- You simply want to trigger a campaign B for all of the customers referenced within ‘invitees’ (to send transactional e-mail notifying about invitation).
How can you do this?
What we’ve tried / does not work:
- API-triggered broadcast : Not an option, as only works every 10 seconds (and is not recommended for transactional context, as stated here).
- Sending a transactional API call for every recipient is not an option either, as the event ‘Invitation’ is triggered from the frontend, so we would need to fire like 5 - 10 API calls to the transactional API before delivering the API response back to our client (for the request triggering the ‘Invitation’ event).
- Batch Update: You cannot perform batch updates ‘for all users whose ID match any ID of an array provided in the trigger’.
- Webhook-triggered campaign: Same problem as for batch update.
- Current solution we have, which feels really wrong and is not scalable: Create an event-triggered campaign which, in addition to the ‘invitees’ attribute, sends an ‘amount_of_invitees’ attribute. Then, in the workflow of the campaign triggered via the ‘Invitation’ event, flow through 10 sequential True / False checks, in the sense: ‘if the amount_of_invitees is at least 2, send e-mail to ‘invitees[1]’, then if it’s at least 3, send e-mail to ‘invitees[2]’, and so on. But besides that this feels really wrong, this requires an adaptation of the workflow every time the amount of possible invitees increases.