StableGuide
Create a customer from a form
Goal: a visitor fills in a form on your site; a Customer record is created and your team is notified. Optionally the customer receives a welcome email.
Create a customer from a form
Goal: a visitor fills in a form on your site; a Customer record is created and your team is notified. Optionally the customer receives a welcome email.
Data needed
- An entity Customers with at least the fields Name (text), Email (email) and Phone (phone). Templates and the Customers business component create this for you.
- If visitors who are not signed in should be able to submit, the Public role needs Create on Customers (see Entity permissions). Staff and admins can always create.
Step 1 — the form
- Open the page in Build and drag a Form onto the canvas.
- In the inspector's Content tab set Saves to entity to Customers and Mode to Create a new record. Set the Submit button text and the Success message ("Thanks, we'll be in touch").
- Drag inputs into the form: Text Input (name
name), Email (nameemail), Phone (namephone). The input's name must match the field key of the entity so values map automatically. - Preview the page and submit once. A Customer appears in Data → Customers (test data).
With no actions on onSubmit, the form saves directly to its entity. If you prefer explicit actions, add Create record → Customers with Use values from the surrounding form ticked on the form's onSubmit event; the result is the same, and this variant also fires the A form is submitted trigger.
Step 2 — notify the team
- Go to Logic → Workflows → New workflow and choose When a record is created → send email, entity Customers. Name it New customer → notify.
- The workflow opens with a Send email step. Replace its To with your team's fixed address (for example
sales@yourcompany.com), subjectNew customer: {{record.name}}and a body such as:
Example
A new customer signed up.
Name: {{record.name}}
Email: {{record.email}}
Phone: {{record.phone}}- Click + after the email and add a Notification step: title
New customer {{record.name}}. It appears in Logic → Run history under In-app notifications. - Keep the switch On. Submit the form again in Preview and check History.
Resulting behaviour
- Submitting the form creates the record immediately and shows the success message.
- The workflow runs on the server right after the record is saved, whether the record came from this form, another form, the data editor or an import.
- Each run is logged with the email step's output (
{ "to": "…", "status": "sent" }).
Variations
- Welcome email to the customer: add a second Send email step with To = Current record › Email.
- Only for business customers: set the trigger's Only if to Company is not empty.
- Redirect after submit: on the form's onSuccess event add Go to page → Thank you.
- Edit instead of create: set the form's Mode to Edit an existing record on a dynamic page that receives the record id.
Common mistakes
- Input names that do not match field keys: the value is dropped. Check the key in Data → Customers → Fields.
- A public form without a Public Create rule: anonymous visitors see "Please sign in to create customers."
- Email delivery not configured: the step status is logged in local development (dev outbox) and the email is not delivered to a real inbox.