Home

How to Send an Email After a Customer Has Filled Out a Form

Let’s assume you want to collect additional data about new users who have recently registered on your website. For this, you can use a form. But how do you set it up and build further communication?

As an example, let’s say users provide their email when registering. We want to collect more information about them, such as their date of birth. Users will receive a small bonus — a promo code — for providing additional data. We will send a message with this promo code to their email address.

In this case, the form might look like this:

Let's go through the process of creation and configuration of this form step by step, as well as the subsequent communication with the user after they fill out the form.

Step 1. Creating and Configuring the Form

In the "Weblayer" section, click on "Forms" and create a new form or edit an existing one. A form can contain any number of pages (and any number of different blocks within them), depending on what information you want to collect.
If you are creating a new form, switch to the "Constructor" tab and add the first page. Drag and drop the "Date" block onto it: this will be used to collect the user's date of birth.
In the "Validation" section, select "Required". Now the user will need to provide their date of birth for the form to be submitted.
Don’t forget to add an "Email" block and make it hidden. This is required to match the user's email address with the address in the database.
Optionally, you can add other fields, such as a field for the name (a "Short text" element) or phone number (a "Phone number" element). If necessary, these can also be made mandatory for filling out.
Depending on the tasks at hand, you can create a multi-page form with various surveys and set up a simple or a complex conditional logic.
After you have finished creating and configuring the form page and its elements (and, if necessary, the page-by-page logic), click the "Save" button in the top right corner.

Step 2. Configuring the Import of User Data Into the Database

Next we need to configure how the new user data is imported into the database after the form is submitted. Here’s how it’s done.
Select the "Actions" tab and click "Profiles import".

Next, configure the matching profile settings:

  1. Profile search mode in the profile database: what data will be used to search for the profile in the database. For example, if you select email, the platform will search for a profile with the same address that the user provided during registration. If the email is found, the platform will update the corresponding profile's data.

  2. Database to search for a profile: here, select the database in which the user's email address will be searched.

  3. External data source to search: select the element of your form to take the data from. For instance, if the search is conducted by email, choose the field that corresponds to the user’s email address.
Select the "Update only" import method, since we will only be adding new information to existing profiles in the database.
Scroll down to the "Column mapping" section and click "Add".

Here you can add as many fields as needed. It all depends on what information the user provides in the form.

In our case, the user is expected to provide their date of birth. Therefore, we need a corresponding field where we will configure:

  • Field in the database: which profile field the information will be saved to.

  • Action: "Set from".

  • Source column: which form field to take this information from.

Make sure that the correct data will be entered into the correct profile field and save the form using the button in the upper right corner.

Step 3. Creating and Configuring Email Templates

Next, we will need two email templates.

  • The first one will be sent to subscribers registered in the last 7 days. Here, we will offer them to fill out the form and receive a small bonus.

  • The second one will be sent to those who filled out the form. Its purpose is to thank the subscriber and offer a promo code.

The first template must contain a link to the form. This can be added through the "Forms" variable: simply select it from the dropdown menu and choose the desired form (and page, if applicable).
Now let's configure the pre-filled fields (in our case, email). Click "Add", select the email field, then "Set from" and lead.email. Now the profile email address will be automatically inserted into the hidden email field.
In the second template, add the promo code via a variable. Prepare it beforehand in the "Loyalty""Promocodes" section.

Step 4. Configuring a Segment and a Regular Mailing

Next we need to set up an updatable segment. Once a week, it will collect new profiles (for example, users registered in the last 7 days) and send an email to them asking to provide their date of birth.

Enter the name, select the required database, and click "Continue" to proceed.
Click the "Condition" button, select "Create date" with conditions "Date/age relative to current date", then "enters in period" and set the days to "-7".
In the "Auto-update schedule" section, set the segment to update weekly: for example, every Tuesday at 02:00.
After saving the segment, proceed to create the mailing. Select "Regulars" and click "Create". Choose the email channel, select the resource, choose "Segment" in the "Audience source" section, and specify the segment you created earlier.

Next, select the message template.

After that, set the mailing schedule. For example, let's specify that the message will be sent at 13:00 on Tuesdays.

Now the campaign is configured. Click "Save".

Step 5. Sending a Trigger Mailing After the Form is Filled Out

The final step is to send an email to subscribers who filled out the form and provided their date of birth. For this, we will use a trigger mailing.

Follow to the "Triggers" section and create a new mailing. Select the channel, resource, and template. Next, in the "Trigger" tab, you need to set the condition under which the email template will be sent: in our case, "Form fill".

Select the form and the database. You can also set a waiting time if necessary. But in our example, this is not needed: the email will be sent immediately after the user fills out the form.

Activate the trigger mailing and save it. Now, thanks to the configured form and mailings, the following will happen automatically:

  1. A new user receives an email asking to fill out the form.

  2. When the user provides their date of birth, the data is imported into the database and added to the profile.

  3. Immediately after filling out the form, the user receives an email with a promo code for a discount.

You may be interested

subscription, banner, email

We’ll show you the platform and find a solution tailored to your business goals

Don't forget to subscribe to the blog newsletter

To stay up to date with all the news and read new articles, join the Craft Marketing Telegram channel

subscribe blog img