Skip to main content

WPForms

WPForms is a forms plugin for WordPress. Its Webhooks addon sends every entry of a form to an address, with the fields you choose. Pointed at the Flows address, it starts your flows: a request from the site gets an answer in Viber or SMS within seconds.

Written from WPForms documentation

This page is written from the public documentation of WPForms and has not been checked on a live account yet.

What you need​

  • A WPForms Elite license: the Webhooks addon comes with it.
  • One address for all forms. A form can have several webhooks (Add New Webhook).
  • You choose the keys of the request yourself: AlphaFlow reads phone, email, name, form and event. In the cabinet WPForms is connected as a Website form — the same connection that takes Wix and Gravity Forms, see Website forms.

Step 1. Create a connection​

  1. Open Flows → Connections, press Connect a system and choose Website form.
  2. Press Copy address. It looks like https://events.alphasms.net/hooks/<TOKEN> — keep it secret.

Step 2. Set up the form in WPForms​

  1. In WPForms → Addons install and activate the Webhooks addon.
  2. In the form builder open Settings » Webhooks and switch on Enable Webhooks.
  3. Request URL — the address from the cabinet.
  4. Request Method — POST.
  5. Request Format — JSON.
  6. Secret — leave it empty.
  7. Request Body — add the pairs: the key phone with the phone field (Select Field), email with the Email field, name with the Name field.
  8. Optionally add a Hidden Field with the name of the form as its default value, and the key form with this field. The same way a hidden field with the value lead_submitted and the key event changes the event (see Events).
  9. Press Save.

Name the keys exactly like this: AlphaFlow looks for the phone under the key phone. The request then looks like this:

{ "phone": "<Phone field>", "email": "<Email field>", "name": "<Name field>", "form": "<hidden field>" }

Conditional Logic of the webhook decides when it is sent; it is optional.

Step 3. Send a test​

Send the form on the site with your own phone number. The event appears in Flows → Connections → Event journal within seconds, and the connection shows Recognised: Website form.

Events​

WPFormsAlphaFlow eventProperties
A form entry without the key eventform_submittedform
A form entry with event = lead_submitted, order_created, order_paid or appointment_scheduledthe same nameform

Put order_paid into event only on a form whose entry means a completed payment; a form that only places an order uses order_created: otherwise an unpaid order reaches the customer as "paid".

  • form is the name of the form from the hidden field, if you added it.
  • Any other value of event gives form_submitted; other names are set in the connection.

The contact is found by the keys phone and email; the name comes from name. The time of the event is the time it was received. The names of the events are the ones the ready-made templates expect — see Recommended events.

Good to know​

  • The WPForms help does not describe repeats of a webhook.
  • The request has no id of the entry, so AlphaFlow tells entries apart by their content: identical entries within 10 minutes become one event, a later one is recorded again.
  • Fields with several values, such as Address and Checkboxes, come joined with ||.
  • With a Secret WPForms adds a hash to a header of every request, but the help names neither the header nor the algorithm. Leave it empty: the secret in the address is enough.
  • The address always answers 200. Above the daily event limit the event is refused in AlphaFlow with quota_exceeded and shown in the journal; the webhook in WPForms stays on.

WPForms documentation​