Solved

How to set a new attribute as a date and use it in a workflow

  • 31 May 2023
  • 7 replies
  • 232 views

Hello,

I have a couple of questions regarding attributes, and I'm hoping you can assist me:

  1. Is it possible to set an attribute as a date when I create one for a person? I'd like to create an attribute named 'Date_Time_Support_Rqst'.
  2. If #1 is possible, when setting up a workflow for a campaign, can I schedule a delay between emails based on this custom attribute? For example, sending an email 3 hours after the 'Date_Time_Support_Rqst'.

Thank you :)

Gregory
 

icon

Best answer by Felix 2 June 2023, 10:30

View original

7 replies

Userlevel 4

Hey Gregh,

  1. Yes, you can set an attribute as a date. Please be aware that customer.io works with UNIX timestamps. In case you are using “create or update a person” in a workflow, you can use e.g. {{ ‘now’ | date: ‘%s’ }} to use the current date and time.
  2. If you build only use one campaign for the whole scenario, you can use “time delay” to wait for three hours. In other cases a delay of only a few hours has to be handled differently. I advise you here to create a second attribute that stores the exact time to send the email, e.g. {{ ‘now | date: ‘%s’ | plus: 10800 }}. Then you can create a “wait until” where the exact time calculated is equal to {{ ‘now’ | date: ‘%s’ }}.

Hope that helps,

Felix

Thanks a lot Felix.

I forgot to mention something important: The data that are sent to CIO as attributes are coming from Google Sheet via Zappier. So let’s say that cell A2 is a date & time field in Google sheet, I’d like that cell value to also be reflected as a date attribute in CIO. Is that possible?

Many thanks,

Userlevel 4

Hey Gregh,

yes. In order to make it a timestamp you simply have to convert the Google Sheet date & time format to a unix timestamp before importing. Check out this page to implement the fomula (lower part).

 

Make sure to only import the unix timestamp to CIO 😉 There is nothing you have to do to mark it as timestamp in CIO once imported.

 

Felix

Awesome! :) Thanks a lot

Have a great day

Actually, Felix, one last question on the same topic.

In my workflow, can I use _created_in_customerio_at to trigger an email to be sent via “wait until”.

E.g. Wait until 22 hours after _created_in_customerio_at , then send the email.

Couldn’t find how to achieve this.

Many thanks,

 

Userlevel 4

Hey Gregh,

you can do this, but it allows you only to specifiy days, not hours nor minutes:

You can create a segment that includes people that got created in CIO (see e.g. the sample segment “Signed up” and use a “time delay” in the beginning of your campaign.

 

Best,
Felix

Thanks Felix!

Reply