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