Using TextIt to Assign & Validate Coupon Codes, ID Codes and More

SMS is a popular channel for validation of any kind. In fact, it's built into most of our favorite services, as Google, Facebook and others provide 2-factor authentication to protect your accounts. If you've ever connected a Twilio number to your TextIt account or downloaded Uber, you've likely received a text containing a code and instructions to enter it into the app.

While TextIt's WebHook RuleSets are ideal for coupon code, order number or identification code validation at scale, we also offer a lightweight method that anyone can use: storing these codes as contact attributes and validating them with a simple, three step workflow. 

Getting Started

First, you'll need to create a contact field and assign each contact a code. Codes can easily be generated in Excel or within a workflow using the RANDBETWEEN function. 

Assigning Each Contact a Code

If you'd like to assign codes to contacts and then import them into TextIt using a spreadsheet, you may do so by populating the column assigned to each contact's code with the =RANDBETWEEN expression: 

You can also use a workflow to generate codes. Here's how that might look:

The first step will be to generate the code and assign it to a contact field using an Update the Contact action. In the example below, the field that will contain the code is called Participation Code, which will be assigned a random 4-digit number between 1000 and 9999 using the @(RANDBETWEEN(1000, 9999)) expression: 

A message will then be sent to the contact containing the code. Each time a contact passes through this workflow, a new code will be generated and assigned: 

Validating Each Contact's Code

Once you've assigned a code to a contact field for each contact, you can evaluate it against that same contact field using a simple "Wait for Response" RuleSet. All you need to do is place the contact variable representing the contact field for each contact's code in the RuleSet's value input: 

That's all there is to it. The resulting workflow is as straightforward as can be for the end user: 

Download these Flows

If you've purchased credits, you can download the workflows referenced in this post and import them into your account for guidance. 

Code-Generating Workflow: 

Code-Validating Workflow: 

Your feedback is invaluable to us. You can share your questions, comments and suggestions with us at If you haven't tried TextIt, you can do so for free here