Is there a variable for the current date/time?

Hello everyone, been lurking a while and i am new to Mautic and i like it a lot already.

I am building a Woocommerce coupon code generator that is triggered from Mautic by a webhook.
The idea is that a campaign triggers a GET-call to Woocommerce, which uses the variables provided in the GET to generate a coupon code. The campaign is of the sort that “If you have not shopped for 6 months, you’ll get this coupon code that gives you free shipping and a little discount”

The coupons will be generated such that they are only able to be used once per customer and need to be unique.
I am thinking of a way to make the coupons always unique, but not random, for example “CAMPAIGNNAME-TODAYSDATEANDTIME-MAUTICCONTACTID” or similiar, that way there is no need for randomness since todays time and date is constantly slipping away from us, never to be seen again sigh.

The question; Is there a dynamic field or function in Mautic that simply tells the current date and/or time that can be included in the GET-call? Like “{currentdate}”?

After the code is generated, Woocommerce will return the new code through an API call and insert it into a custom field on that particular contact in Mautic so it can be used in the campaign.

I am open to alternative ideas, this is just something i came up with in order not to make the thing too complicated :slightly_smiling_face:

Hello again,
Nevermind, i just realized something;
Mautic does not need to tell the current date and time to Woocommerce, because Woocommerce can find that out by itself without any problems and add it to the coupon code :man_facepalming:

Nevermind! But hello anyway :wave:
I’m more than willing to share the code when i’m getting close to done if anyone is interested in it?

Hi, share your findings, I am sure it will be useful to someone.

Sure, i created a new thread to make it a bit easier to find for people;

Cheers