Tutorial

Controlling what time your customers are sent a message through workflows

  • 14 February 2023
  • 1 reply
  • 96 views

Badge

Workflows can be super powerful in controlling when customers are sent messaging. Check out this use case below where the customer wants to send a different message based on set office hours. This example could also be used to NOT send messages based on specific hours by leaving off an email on one branch. 

 

In some cases, you’ll want to send a different message to people based on the time of the day. For example, you could need to send a dedicated confirmation to people that sign-up outside of your working hours (e.g. after 6 PM) to let them know you’ll get in touch the following day.

To do this, you can create a dedicated event-triggered campaign like the one below:

 

RTITYhcQYCTtIn1bL38y6ZGcUiu-v0ZkR7KBJqTNPWavnjO1-tkC2NwfEalTNXAYYxWWMnDgXfyBARCNqp-cSHik-rq3zjGlEfQKifDhHuFfVSZqUmThr2EQ6YYv8PzAkk2GwPcIH6m9DmMy4xLLoOM

 

Let’s have a look at each step:

 

1- The first ‘Create or Update Person’ action will capture the hour when people sign up. You can set this so that Customer.io will create or edit the ‘office_hours’ attribute of that person using the Liquid formula {{ "now" | date: "%H" }}
As you can see below, a profile that completed the trigger event at 17.03 will have ‘17’ as  ‘office_hours’ value:

Y39L18KIlTsAxz4OOmpkHNtdnO5s019tmOdh4vhUdAYTXY4tcPrH_1nQzhvfiF4opCcfm5axDynccCPn_qImfa-6tIvAP1FiPSUxOSxFW5JnaqswizHj7uix9Ak9QaZ7RYLRwBmsgNMtjdCcb4zG5fU


This step could already be enough if you are familiar with how to set all the other conditions and filters so that a message will be sent only if the value is between 9 and 18.
If you prefer, you can include the other steps so that the attribute ‘office_hours’ is clearer to understand for you and your team.

 

2- You can add a True/False branch, based on the value of the ‘office_hours’ attribute:
e_15idTEx40nu6swjtPmYo3U7KYTk5DzGpj61_xe_-bGSKwhQv2zhm0h-URdBJxsmUeD-PZ7tLOBO60aruPg1GexDsY4221d1LlGQXHhHiko2RJaprQJ_hzdYfl1IJmeyxHy8oMfZZ1hm9CyHWPZYp4



 

3- If the condition is ‘True’, you can add another 'attribute update' action to update the value to 'yes'


RsNIZ4htcbXq1IQc_GmhToySdeE1Wruu2hlgNmLA-Y214mWBCYU8dPdSiHHmc_6PH5qnIT5HXPsTEWnLkDlRcE9wsxsbpD5j9Zo7eBQrnfQG058Q5I-2TFbhWlFgAGlqyR9u9fLK3z2lTLdunspHNck

 

4- If the condition is ‘False’ - meaning that the person signed up after your working hours, you can then save 'no' as an attribute value:

o9QuNw_8HzSUXa5g_cDCmAVyRZC1qo8P-4LwQf7C300p4Zh58UTSwW7Z_rVX39981W-9MNnyxtjVr4ns1atucKD-8RvZEtfLehyrMHK9PBy7-De3Mq6AykWnZL28qmJ9-BIWNUjf6_ibOLfcDcjj9ls

 

5 - You can then leverage this yes/no attribute in your other workflow with the messages. You can create branches or add sending conditions so that specific messages go only to people that have completed the sign-up after working hours.

This is just an idea of how you could leverage the powerful  ‘Create or Update Person’ action along with Liquid - let us know if you’ve created anything different for other specific use cases!

 

 


1 reply

Badge

Thanks for this. This helped me build a campaign in which people enter everyday, but they exit if it’s Monday or Tuesday, and only get messages Wed - Sunday. 

Reply