Solved

Skip sending an email if an object's status changes.

  • 12 May 2023
  • 5 replies
  • 65 views

We have the concept of a “Booking”. A Booking has a “start date”, and the status of a booking can either be accepted, declined, or cancelled at any given time.

I would like to schedule a reminder email to be sent 1 week before the "start date". However, I don't want to send the reminder email if the trip has been declined or cancelled within that timeframe.

Is there a way to achieve this? I’ve explored “Send and Receive Data”, but that wont really work in the case where a user is associated with multiple ongoing bookings.

What would be really nice is if I could use “Send and Receive Data” and use the response inline rather than being forced to set it as an attribute.

icon

Best answer by longlostnick 12 May 2023, 19:50

View original

5 replies

Userlevel 4

Hey Nick,

as you mentioned one person can have multiple bookings at the same time. This is one reason why CIO introducted “objects”, which would perfect to use in your scenario. Multiple objects (like a booking) can be associated with one single person and can be handled by it’s own (e.g. booking status).

 

What you also can do (gets a bit messy, though) is to create attributes for multiple bookings. Big downside is that there will be a maxium of bookings that can be associated with your person:

Attribute Sample Value
booking1_name Super Retreat
booking1_status confirmed
booking2_name Fishing Trip
booking2_status cancelled
booking3_name Visiting Zoo
booking3_status not_confirmed

 

Hope that helps,

Felix

@Felix thanks for the reply! I think objects is probably what I want. However, the functionality doesn’t seem like it’s there yet.

The second solution wont work. Not only is it crusty, on the supply side our outdoor guides can have 10s/20s/30s+ ongoing trips at any given time, which makes this unweildy.

My plan for now is to just run a scheduled job on my end to trigger a new event “Booking Upcoming” we can create a new campaign around. This makes it more rigid in that it requires engineering work to update the schedule, but we don’t change it super often anyway.

I hope Customer.io considers improving the “Send and Receive Data” feature to allow running some basic logic inline based on the response of the request. That seems like it would unlock a ton of functionality and impact beyond just mine!

Userlevel 4

Hey @longlostnick,

if you don’t want to store the booking information I would recommend pushing a webhook to customer.io. For this you might want to check out the webhook trigger. That might be an easier setup as you describe already.

For objects, you should check out the roadmap (#3).

 

Hope that helps,

Felix

I have a similar use case but don’t see how I can use object data in a campaign.

@mingo3369 from what I understand object data doesn’t support this yet. My solution for now is what I mention in my previous comment. I setup a scheduled job to trigger a new specific “Booking Upcoming” event that I created a new campaign with. 

Reply