Question:
How do I add custom validation during submission of a form to check against existing Contacts?
Product:
Wix Editor / Velo
Scenario
I am trying to increase subscription to my email newsletter by offering $5 off. I only want to offer this promo to new subscribers. I want to prevent existing Contacts from submitting the form/receiving the promo code.
What exists
I have a Lightbox that pops up once per user session that says “Subscribe to our newsletter for $5 off”. In this Lightbox, there is a Wix Form to collect email, phone, and a reCAPTCHA. User clicks Submit.
Clicking Submit opens a new confirmation Lightbox. The submission of the form also triggers a Wix Automation to email the new Contact with a custom email including a static promo code. This automation is configured so that the form can only be submitted ONCE PER CONTACT.
Challenge
My Contact list includes contacts that I imported from a 3rd Party marketing site. These contacts have already opted-in for the newsletter. I do not want these contacts to be able to submit the form/trigger the automation/receive the coupon, however, since the Wix standard is “once per contact”, these existing contacts can still submit the form once.
What I’m trying to achieve:
I am trying to add validation to submission of the Wix Form so that existing Contacts (some of which have been imported from a 3rd Party Site) cannot submit the form/will show an error that they’ve already subscribed.
Notes
I understand that Wix has an option to send Coupons via Wix Automations, however, I manage promo codes via Toast (3rd Party Site) and want to maintain that paradigm.
I’d like to be able to add a Condition to the Wix Automation to check the Contact Creation Date or something, but seemingly since it’s not a standard field, you can’t select it for the Condition. I was also thinking about using “Contact ID > [count of contacts]” but I can’t see what the contact IDs are on the UI, so idk what the logic would be.
I also tried adding custom fields to the Contacts for “Upload Date” so that I could make the logic “Send if Upload Date is after [date of migration of contacts from 3rd party]” but the custom field isn’t available as a selection choice from the Conditions UI.
I have over 40,000 contacts, which seems like too much to process on the FE.