top of page

Wix Triggered Emails: Template Setup and Submission Workflow

Writer: Faysal Jaali
Faysal Jaali
Jul 26, 2023
6 min read

Updated: Nov 2

Setting up a triggered email in Wix has two parts: preparing a published template and deciding which trusted event should send it. A form button click alone does not prove that a submission was saved or that an email should be sent.


This guide covers setup and workflow design. For a small backend code example, continue to sending a triggered email to a contact.


emails on phone

1. Decide whether custom code is needed


For a standard form acknowledgement or team notification, review Wix’s native automations first. Use custom code when the event or business rules require logic beyond the available workflow.


Write down the trigger, recipient, template and expected outcome. For example: after a valid enquiry is saved, acknowledge receipt to that contact and separately notify the responsible team member.


Keep a customer acknowledgement separate from a marketing subscription. The content and permission requirements depend on the actual communication.


2. Create and publish the template


Follow Wix’s triggered-email setup instructions. Prepare the subject, sender information, message and fallback text for optional variables.


Copy the generated email ID from that template. A template ID identifies what to send; it is not a recipient address or a contact ID.


Choose variable names you can reliably supply, such as firstName or enquiryReference. Keep the variable keys identical in the template and code.


3. Identify the recipient correctly


The backend emailContact method expects a Wix contact ID. Do not substitute a member ID, email address or the ID of a CMS form record.


Wix’s emailContact documentation describes its subscription-status rules and string-valued variables. Review those rules before diagnosing a non-send as an API failure.


For a form workflow, determine how the contact is created or resolved and how that identity is associated with the accepted submission.


4. Connect the send to an accepted event


Validate the submission on the backend, save the business record and make the notification decision from that trusted state. The public browser should not supply an arbitrary recipient, template ID and message.


Record a stable submission identifier. Decide how duplicate notifications will be prevented if an event is retried or a visitor clicks twice. Disabling a button helps the interface, but it does not replace backend duplicate handling.


For systems where duplicate sends matter, use a durable delivery record and a controlled processing workflow. An in-memory flag in a serverless function may not survive another invocation.


5. Define success and failure


There are several separate outcomes:


  • The form accepted the input.

  • The enquiry was stored.

  • The email request was processed.

  • The email arrived in an inbox.

  • Someone acted on the enquiry.


Give visitors a success message based on the business action actually completed. If an enquiry was saved but a notification failed, preserve the enquiry and route the operational issue for follow-up.


Do not show a green “sent” message from a catch block or silently swallow an error.


6. Test on the published site


Use a clearly labelled test contact and submission. Confirm the stored record, recipient identity, template variables, fallback text and destination inbox.


Test invalid input, an unsubscribed contact, a missing template setting, a repeat submission and a provider failure. Check the mobile form and notification recipient after publishing.


Wix notes that test sends contribute to triggered-email statistics. Keep test activity separate when evaluating the business workflow.


Define the event and recipient before designing the email


Write a short event contract: what happened, which server-side process confirms it, who should receive the message and which information belongs in it. A visitor pressing a button is not always the same as a completed booking, accepted order or successfully saved request.


For a hypothetical quote acknowledgement, the event might be a successfully stored enquiry. The recipient should be derived from that enquiry’s verified workflow rather than an unrestricted address passed to a public sending function. The message can acknowledge receipt without promising that a final quote or appointment has already been approved.


Keep transactional and promotional purposes clear. A useful acknowledgement explains the submitted task and the next step. Adding unrelated offers can change the nature of the message and the subscription considerations that apply. Check the current Wix rules and the requirements relevant to the business’s actual email use.


Build the template around a small set of variables


Choose the variables the event can reliably supply. A first name, request reference and short next-step description may be sufficient for an acknowledgement. Avoid inserting an entire unreviewed form submission into the message when only a few fields are needed.


Use the same variable names in the published template and in the backend variables object. The name is an identifier, not just a label in a design. A difference in spelling or capitalization can prevent the intended value from appearing.


Prepare content for missing optional values. A greeting should still read naturally if a person did not provide a first name. Check long names and special characters in the preview and in a real controlled test. Keep the subject line accurate for both the normal and fallback versions.


Confirm the template and site configuration


Publish the intended triggered-email template and use its identifier in the integration. A copied template or an unpublished revision can have a different status from the one used by the code. Record the template identifier and its purpose with the workflow documentation.


Confirm the sender information and the reply destination. A customer replying to an acknowledgement should reach a monitored route. Check the message’s links on a phone and ensure the destination remains useful after a site redesign or URL change.


Use the backend sending example for the controlled code test. Keep the template setup guide and the sending example connected so a reader can see both the content configuration and the method that uses it.


Make repeated events predictable


Decide what happens if the same action is processed twice. A visitor may double-click, a network request may be retried or an event may arrive again. The business should not send a new acknowledgement every time an already completed event is observed.


For a production workflow, keep a server-side record linking the business event with its notification state. Design how the workflow handles a saved request whose email step fails. Sending again should be a controlled recovery action, not an automatic loop with no stopping condition.


This event record also helps support staff answer a practical question: was the customer’s request saved, and what happened to its acknowledgement? Keep those observations distinct. An email failure should not silently erase the underlying enquiry.


Review the actual message a recipient receives


Use a contact you are authorized to test with and inspect the received message. Check the sender, subject, greeting, variable values, links and mobile layout. Confirm that the text explains what happens next and does not claim an action the system has not completed.


Try a missing optional value and a long permitted value. Check the failure path for a wrong template identifier or an unsuitable contact. Keep the test information separate from real customer records and remove unnecessary test data through the site’s normal process when appropriate.


An accepted API call and a message delivered to an inbox are different observations. Record the result you actually checked and use the relevant Wix reporting or diagnostics to investigate delivery problems. Do not label every successful function return as proof that the recipient read the email.


Maintain the email when the business process changes


Review the template after changing the quote process, response hours, booking rules or contact route. Update the sending code when a variable contract changes. Keep a small change record so staff know which message is associated with which event.


A reliable triggered email is part of the customer journey. It should accurately reflect the saved event, provide a useful next step and leave staff enough information to investigate a problem without exposing private details in logs or screenshots.


Define the notification contract


Decision

Example for a quote enquiry

Verification

Trigger

Validated enquiry saved successfully

A saved business record exists before the send step

Recipient

Contact linked to that enquiry

An unrestricted browser ID cannot choose any recipient

Variables

firstName and a request reference if configured

Names match the published template exactly

Repeated event

One acknowledgement per intended event

A repeated event does not cause uncontrolled duplicate sends

Delivery check

Authorized test recipient

Inspect the received message as well as the API result


This is an implementation example rather than a claim that the small sending method already implements event storage or duplicate prevention. Use the backend email example for its exact code boundary.


Does a successful API call prove inbox delivery?


No. Confirm arrival separately and check the operational records when troubleshooting.


Should I expose an Anyone method that accepts any email template and contact?


Use the narrowest operation your application needs. Resolve permitted recipients and actions from trusted business state.


For the implementation example, read how to send triggered emails with Velo. If your form saves entries but enquiries do not reach your team, use our Wix lead troubleshooting guide.

bottom of page