Actions after a submission
When a submission is stored, every action of the form that is enabled and whose conditions match is queued on Symfony Messenger. Actions never slow down the visitor, and a broken mail server never loses a lead: the submission is already saved.
Running the queue
Section titled “Running the queue”Actions use their own transport, pimkit_forms, built from Pimcore’s PIMCORE_MESSENGER_TRANSPORT_DSN_PREFIX. Run a worker for it next to Pimcore’s own workers:
bin/console messenger:consume pimkit_formsRetries and the action log
Section titled “Retries and the action log”- Each action of a submission has one row in
pimkit_form_action_logwith its status (ok,retrying,failed), the number of attempts and the last error. - Temporary problems (mail server down, timeouts) are retried after 1 minute, 10 minutes and 1 hour.
- After the 4th attempt, or right away for other errors (bad config, no valid recipient), the action is
failed, the submission gets statusfailedandActionFailedEventis dispatched. - Set
pimkit_forms.notify_emailto get an email for every action that failed for good:
pimkit_forms: notify_email: 'webmaster@example.com'- A message delivered twice does not run an action twice.
- With “store submissions” off, the visitor’s data is wiped as soon as all actions are done. The row stays for statistics.
Built-in actions
Section titled “Built-in actions”email: notify the site owner
Section titled “email: notify the site owner”| Config | Meaning |
|---|---|
to |
Addresses. An entry can be a field token like {{ email }}. Invalid addresses are skipped |
cc, bcc |
Same as to |
replyToField |
Field whose value becomes the Reply-To address |
subject |
Text per language. Tokens: {{ field_name }}, {{ form }}. Default: “New submission: Form title” |
template |
Empty or admin_default for the built-in template, or the id of a Pimcore Email document |
attachFiles |
Attach uploaded files (with file fields) |
The owner’s email is in the site’s default language. The built-in template lists every field that has a value as a table, with choice labels instead of raw values.
confirmation_email: copy to the visitor
Section titled “confirmation_email: copy to the visitor”| Config | Meaning |
|---|---|
toField |
Field that holds the visitor’s email address. Nothing is sent when it is empty |
subject |
Text per language. Default: “Thank you for your message” |
template |
As above |
The copy is in the language the visitor used.
Pimcore Email documents
Section titled “Pimcore Email documents”With a document id as template, Pimcore renders that Email document. It gets these parameters: form_title, form_name, submission_uuid, submitted_at, rows (list of {name, label, value}), locale, and field_<name> for each field. The document’s subject is used unless the action sets one.
Mail goes through Pimcore’s mailer, so the sender address, the transport and debug mode (all mail to the debug address) come from Pimcore’s settings.
webhook: send the submission to another system
Section titled “webhook: send the submission to another system”| Config | Meaning |
|---|---|
url |
http:// or https:// address |
method |
POST (default), PUT or PATCH |
headers |
Extra headers, like an API key. Host, Content-Type and the PimKit headers can not be set |
secretRef |
Name of a webhook secret (see below). The body is then signed |
payload |
default for the JSON body below, or a Twig template |
timeoutSeconds |
1 to 30, default 10 |
The default body:
{ "event": "submission.created", "form": {"name": "contact", "title": "Contact us", "version": 3}, "submission": {"uuid": "01a2...", "locale": "en", "siteId": null, "createdAt": "2026-11-28T12:00:00+00:00"}, "data": {"email": "jane@example.com", "topic": "sales"}, "fields": [{"name": "topic", "label": "Topic", "value": "Sales"}]}- A Twig template gets
form,submission,dataandfields. It runs in a strict sandbox (onlyif,for,setand simple filters such asjson_encode,escape,default,join,date). A body that starts with{or[is sent as JSON, anything else as text. - Every request has
X-PimKit-Delivery: <submission uuid>:<action key>. It stays the same on retries, so receivers can skip duplicates. - With a secret,
X-PimKit-Signature: sha256=<hex>is the HMAC-SHA256 of the raw body. Check it like this:
$expected = 'sha256=' . hash_hmac('sha256', file_get_contents('php://input'), $secret);if (!hash_equals($expected, $_SERVER['HTTP_X_PIMKIT_SIGNATURE'] ?? '')) { http_response_code(401); exit; }- 2xx is success. 5xx, 408, 429 and network errors are retried. Other 4xx answers fail at once.
- To allow only some hosts, list them. Any other host fails:
pimkit_forms: webhook_allowed_hosts: ['hooks.zapier.com', 'crm.example.com']Webhook secrets
Section titled “Webhook secrets”Secrets are added in the Actions tab (“New secret”) or with PUT /webhook-secrets/{name}. They are stored encrypted in the PimKit settings with PIMKIT_SECRET_KEY, and Studio only ever sees their names. The form definition holds only the name, so exporting or duplicating a form never copies a secret. Set PIMKIT_SECRET_KEY (64 hex characters, openssl rand -hex 32) in the environment and keep it: with a new key, stored secrets can not be read and have to be entered again.
data_object: create a Pimcore data object
Section titled “data_object: create a Pimcore data object”| Config | Meaning |
|---|---|
classId |
Id or name of the class |
parentPath |
Folder, created when missing. Default /Form submissions/{{ form_name }} |
keyPattern |
Object key. Default {{ form_name }}-{{ submission }} |
fieldMap |
Form field to object field, like {"name": "fullName"} |
publish |
Publish the object (default: saved unpublished) |
Values are converted to the object field’s type: dates for date fields, lists for multiselects, booleans for checkboxes. A file field gives only the file names; use asset_upload for the files. Object fields that do not exist are skipped and named in the action log. A retry updates the object it created before instead of creating a second one.
asset_upload: copy uploaded files to Assets
Section titled “asset_upload: copy uploaded files to Assets”| Config | Meaning |
|---|---|
folderPath |
Asset folder, created when missing. Default /Form uploads/{{ form_name }}/{{ submission }} |
Each file is linked to its asset, so a retry skips files that are already copied.
Path tokens
Section titled “Path tokens”Folder and key patterns can use {{ form_name }}, {{ submission }} (the uuid), {{ year }}, {{ month }}, {{ day }} and {{ field_name }}. Values are cleaned so they are valid Pimcore keys.
Actions tab in Studio
Section titled “Actions tab in Studio”
The form editor’s Actions tab lists the form’s actions. Each card has an on/off switch, the settings of its type and, for webhooks and data objects, a field-mapping editor and a secret picker. Action settings are checked against the type’s schema when the form is published, not when a draft is saved.
“Send test” runs one action of the saved draft right away with sample data (or the values you pass) and shows the result. Nothing is stored as a submission, but the action really runs: a webhook is called and a data object is created.
Sandbox
Section titled “Sandbox”The E2E check tests/e2e/studio-actions.e2e.cjs needs a webhook receiver and a “Lead” class with the fields fullName and startDate in the sandbox. Any receiver that answers 200 works, for example php -S 0.0.0.0:8099 with a script that writes the request to a file.
Custom actions
Section titled “Custom actions”Implement PimKit\FormsBundle\Action\ActionInterface. With autoconfiguration the service is tagged pimkit_forms.action and its type can be used in form definitions.
final class SlackAction implements ActionInterface{ public function getType(): string { return 'slack'; }
public function getConfigSchema(): array { return ['type' => 'object', 'required' => ['channel'], 'properties' => ['channel' => ['type' => 'string']]]; }
public function execute(ActionContext $context, array $config): ActionResult { // $context->rows(), $context->text('email'), $context->replaceTokens('New lead: {{ name }}') // throw new RetryableException('...') for temporary problems return new ActionResult('Posted to ' . $config['channel']); }}