Creating a campaign that sends messages to multiple customers for one transaction

  • 13 October 2023
  • 0 replies
  • 26 views

A customer recently wrote in with a detailed description of a use case that they needed help fulfilling. It was interesting to us, so we wanted to share it with as many people as possible to help them with similar cases! 

Here’s the use case written out:

 

Problem:

Someone takes an action on my platform and I want to trigger different emails to 5 different users:

  1. Person A - Email 1
  2. Person B - Email 2
  3. Person C, Person D, Person E - Email 3 which has a subtle customization for each Person C, D, E

Person C, D, and E can't be defined under any Segment. A real-life example could be shopping on Amazon. Once an order is placed:

  1. Email to buyer confirming their order
  2. Email to supplier informing about the order
  3. Email to User A, User B, User C informing them that the item is out of stock now & they need to remove it from their cart.
    • I can't send them all one email. I need to customize the email for their name/ address etc.
    • This is the most important one that I need clarity on.

 

Solution:

In order to solve this, you will need two different events and campaigns to achieve your goal. One event/campaign combo would be for:

  • Person A - Email 1
  • Person B - Email 2

The event would have a payload with the details for PersonA and also the details of the supplier:

POST https://track.customer.io/api/v1/customers/PersonA_ID/events

{
"name": "item_purchase",
"data":
{
"item_name": "something",
"price ": "$5",
"etc": "etc"
"supplier":
{
"email": "supplier@domain.com",
"name": "supplierName",
"etc": "etc"
}
}
}


Email 1 would just go to {{customer.email}} and would send to PersonA. Email2 you would have to go {{event.supplier.email}} which would be Person B as defined by your event payload.

For your second campaign, you would send events to PersonC, PersonD, etc:

{
"name": "item_out_of_stock",
"data":
{
"item_name": "something",
"price ": "$5",
"etc": "etc"
}
}



And that would inform them that the item they were shopping for is now out of stock. There's not really going to be a great way to have a single event trigger so many emails as your Customer.io workspace won't know that PersonC, D etc have an item in their cart until you inform us of that.

It's possible you could look at doing something with Collections or Objects to have a set of Products and their Suppliers, but including that information in the event payload would also work.


0 replies

Be the first to reply!

Reply