Is it possible to calculate the datetime type field on the smart list of smart campaigns based on time?

heojiwon
Level 1

Is it possible to calculate the datetime type field on the smart list of smart campaigns based on time?

Hello I'm Jiwon

Is it possible to calculate the datetime type field on the smart list of smart campaigns based on time?

 

For example, we have the following use case:
We want to send an email to customers who registered before 11:00 AM on the event day.
Then, for customers who register between 11:00 AM and 3:00 PM on the same day, we want to send a different follow-up email.

For the second campaign, we’d like to send an auto-response at the time of registration, without requiring a marketer to manually activate/deactivate the campaign.

Is there any way to automate the trigger campaign using datetime logic, rather than relying on manual control?



Thanks,
Jiwon

Tags (2)
3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Is it possible to calculate the datetime type field on the smart list of smart campaigns based on time?

There’s a way, but it’s quite... unpretty.

 

When something interesting happens, you can write {{system.time}} to a string field using Change Data Value. That’ll give you the time in the format HH:mm' 'a' ('z')', e.g. 05:22 AM (GMT -0400). This will let you use the Starts With constraint on the value. 

 

Weird but it works!

heojiwon
Level 1

Re: Is it possible to calculate the datetime type field on the smart list of smart campaigns based on time?

Hi SanfordWhiteman

Hmm, I think I misunderstood.


I want to find out in a trigger campaign if a certain field (e.g. submission date) is at a certain time.
It doesn't matter if it's a smart list or a flow step.

 

Can you give me an example of how you did it?
Sorry for the details. I really need your help.

 

Thanks,

Jiwon

SanfordWhiteman
Level 10 - Community Moderator

Re: Is it possible to calculate the datetime type field on the smart list of smart campaigns based on time?


I want to find out in a trigger campaign if a certain field (e.g. submission date) is at a certain time.

When is the value of Submission Date being set?

 

You cannot parse an existing DateTime field into Date + Time parts and act differently based on the time range unless you use a webhook-compatible service.

 

But if you’re already setting a DateTime field in a flow, you can also set a separate string field to {{system.time}} which will store the time part for later action. Let’s say:

  • you already have a campaign that triggers on Filled Out Form and a Change Data Value sets Submission Date to {{system.datetime}}
  • you could add another Change Data Value that sets a new field Submission Time Only to {{system.time}}, thus essentially the same point in time

 

That would let you filter on Submission Time Only whenever you wanted, either while the first trigger is still running or any time after that.

 

But for this to work, you must be able to set the Submission Time Only to {{system.time}}. If you can’t do that — like if Submission Date is set via API and could be well in the past — then you must use a webhook to look at the time part.