Skip to main content

OttoKit Integration

Connect Core Forms to OttoKit (formerly SureTriggers): trigger OttoKit workflows from form submissions, and submit a Core Form from an OttoKit workflow.

Integration ID: CoreForms / Trigger: core_forms_submitted / Action: core_forms_submit Classes: Core_Forms\Integrations\AutomationIntegrations, Core_Forms\Integrations\OttoKitIntegration Source: src/integrations/class-automation-integrations.php, src/integrations/ottokit/class-ottokit-integration.php

This is not configured on the form's Actions tab. When the OttoKit plugin is active, Core Forms registers itself as an OttoKit integration automatically, and you build the workflow inside OttoKit.

Requirements

The OttoKit (SureTriggers) plugin must be active and connected to your OttoKit account. Core Forms registers the integration on plugins_loaded when the SureTriggers controller classes exist. No Core Forms settings are needed.

Trigger: Form Submitted

  1. In OttoKit, create a workflow and add a trigger.
  2. Choose the Core Forms app, then the Form Submitted event.
  3. Submit the form once to capture a sample payload, then map the context fields into your workflow steps.

The trigger fires on every successful submission (the cf_form_success hook) with this context:

Context key Description
form_id ID of the submitted form
form_title Title of the submitted form
submission_id ID of the stored submission
entry All submitted fields as key/value pairs

Use a filter step on form_id in OttoKit if the workflow should only run for one form.

Action: Submit a Core Form

OttoKit workflows can also create Core Forms submissions, which is useful for syncing leads from other apps into Core Forms (and firing all of that form's own actions).

  1. In an OttoKit workflow, add an action and choose Core Forms > Submit a Core Form.
  2. Configure the two options:
Option Required Description
form_id Yes Numeric ID of the Core Forms form to submit
data Yes The field values, as a JSON object (e.g. {"name":"Jane","email":"jane@example.com"}) or a mapped key/value set

Keys in data must match the form's field names. The action returns the form processor's response (the same JSON a front-end submission receives), or an error status with a message.

How the action works

The action feeds the payload through Core Forms' internal headless submit path: the form is looked up, a nonce is generated server-side, and the full processing pipeline runs -- validation, storage, and every action configured on that form. Invalid or missing form_id/data returns {"status":"error"} with a message; an unknown form ID returns "Form not found"; field validation failures come back with the processor's error details.

Note that a workflow-submitted form fires the Form Submitted trigger too. Avoid wiring a workflow that submits the same form its own trigger listens to, or it will loop.

Troubleshooting

  • Core Forms not listed in OttoKit: confirm the OttoKit plugin is active on the same site and connected to your OttoKit account; the integration registers only when the SureTriggers classes are loaded.
  • Trigger has no data: the trigger only fires on successful submissions -- validation failures do not emit events.
  • Action returns "Form ID and valid JSON data are required": form_id is missing/non-numeric, or data is not a JSON object.

See also: Integrations overview, AutomatorWP, Uncanny Automator.