Solved

How to restart campaign workflow upon event condition

  • 9 April 2023
  • 3 replies
  • 220 views

Let’s say you have a campaign that is triggered if a customer books the time for an appointment with your staff. Hence, you have an Event like “Appointment Booked”, and that event has a UTC timestamp and a timezone of the appointment’s start.

You then set a “Wait Until..” field in your workflow, which waits for example one day before the start of the appointment in UTC time according to the client’s timezone, to send a reminder e-mail about the upcoming appointment, IF the client did not perform a “Delete Appointment” event until then.

 

The problem we’re having is: How do you handle the case of a person updating the appointment? You could add an additional IF, aside the “Delete Appointment” Event performed, sth like IF “Update Appointment” performed. But if the appointment has been updated, the customer would need to restart the campaign’s workflow. How would you properly do something like that in customer.io? Create an additional event-triggered campaign, which sends the “Appointment Booked” event programmatically when the “Appointment Updated” event is triggered?

 

What we’re currently thinking of doing is something like this:

  • Trigger the campaign via the ‘Interview Booked’ Event
  • Three possible outcomes, from left to right, while waiting for the start time of the interview, specified within the ‘Interview Booked’ Event:
    • if the ‘Appointment cancelled’ event is performed, the flow is exit
    • if the ‘Appointment updated’ event is performed, the system re-sends the ‘Interview Booked’ event to re-trigger a campaign re-entering for the customer who’s within the present journey, then the flow is exit. Question: Could this cause the customer who just re-entered the journey to exit the campaign instantly? Or is a customer flow start unique / are the entries of the same journey by the same customer treated individually? E.g. if the customer enters campaign A twice, and let’s say a second time a little later. If the first journey triggers an exit in the flow, will the second journey in which the same customer is still running automatically also be shortcut to the exit?
    • If the event time is met without any of ‘Appointment cancelled’ or ‘Appointment updated’ being performed until then, the reminder e-mail is sent.

Is this a proper way of doing this, or could this fail, especially regarding the question related to the exit of a customer being within the same journey twice at the same time, but at different stages.

 

A final question in this context is: The middle condition (“Appointment Updated”) would obviously need the information of the updated appointment to be forwarded to the “Re-Send Interview Booked” part. If you put a “Create Or Update Person” Step above the “Re-Send Interview Booked”  which adds the data of the appointment’s update as customer attribute, can you be certain that the subsequent “Re-Send Interview Booked” step will pick up the attributes set via the previous step? Or could there be a synch issue here, and it’s potentially even better to create a second campaign, being an exact copy of the one shown above, except with the difference that the trigger would be “Appointment Updated”?

icon

Best answer by Emaildev 10 April 2023, 21:07

View original

3 replies

Userlevel 1
Badge

Hi there!

 

Thank you for posting to our Community! We appreciate your contribution and are happy to help you here!

 

For the scenario you’ve outlined here, I get the sense that it would be better to skip sending an “Appointment Updated” event, and instead, use the same Trigger event to cover that part of the logic. Happy to elaborate!

 

To make an adjustment to your workflow:

  • Keep the branch with the event “Appointment cancelled” as it is.
  • For the second branch, I suggest you remove it completely. Instead, set an Event-Exit Condition for your campaign that checks for another instance of the “Interview Booked” where the timestamp attribute for the event, is larger than the trigger event timestamp attribute. For this to work, please make sure you send a custom event attribute -for example, “interview_time”-with the proposed interview time.
    Goal Condition Example
  • Make sure you setup your Campaign Exit Settings to include Exit on “They achieve the Goal”
  • Your newer “Interview Booked” event will trigger a new workflow, where the Email with the wait until condition is set to send at the new proposed time, along with the other failsafe conditions; while the old workflow will have ended. Make sure your Frequency Settings allow the campaign to restart with every event sent -which is the default setting-

I hope this helps answer your question here, team! Please let us know if you have any follow-up questions here we can help you with! :)

Best,

Have you actually tested this? If I do as you say, this does not work… the customer stayed in the customer journey first entered (did not exit it), and immediately exit the second customer journey entered (the one of the booking update, shown below):

Result: The second customer journey never executes, and the customer stays in the first journey, hence the one with the wrong date and time of the appointment.

Also, who tells you that a customer books an appointment that is ALWAYS later than the one booked, if he / she has to reschedule the event? Reschedulings can also occur to advance the time of the meeting, not only to postpone; hence your proposition is not a real-life compatible solution.

What we’ve thus also tried is using your approach and setting a campaign exit condition equal to the “Interview Booked” event performed whose “bookedInterview.id” is different from the “bookedInterview.id” of the event trigger. Doing so did not exit the first customer journey of the concerned customer, and started a new one. Hence the customer is in an amount of customer journeys equal to the amount of initial booking + reschedulings; so that also does not seem to work.

For now, we’ll stick to our approach with the “Interview Updated” event and two campaigns, one triggered via “Interview Booked”, and another one triggered via “Interview Updated”. If you found a solution which you’ve confirmed with a little test that it actually works, we’d be happy to know. Thanks for your help anyways.

We’ve changed our approach, and now things are working, without the “Appointment Updated” Event indeed. But we also did not use the “Goal & Exit” approach you mentioned, as this did not seem to work, as mentioned above.

What we’ve done instead is we replaced the “Appointment Updated” condition with a “Interview Booked” event sent condition. Additionally, we’ve added a UNIX timestamp to the event attributes of our “Interview Booked” events we send. In the middle branch, we’ve then told the workflow to exit the customer if:

  • The UNIX timestamp of the “Interview Booked” Attribute is superior to the one of the trigger.
  • The “id” property of the “Interview Booked” event is not equal to the one of the trigger (representing the change to another interview).

This now perfectly did the job in a single customer journey, and indeed without the “Appointment Updated” event.

Reply