concept7 / statamic-salesforce-connector
Send Statamic form submissions to Salesforce: Pardot form handlers and Web-to-Lead, configured per form in the Control Panel.
Package info
github.com/concept7/statamic-salesforce-connector
Type:statamic-addon
pkg:composer/concept7/statamic-salesforce-connector
Requires
- php: ^8.4
- saloonphp/laravel-plugin: ^4.3
- statamic/cms: ^6.44
Requires (Dev)
- laravel/pint: ^1.29
- orchestra/testbench: ^10.0 || ^11.0
- pestphp/pest: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Send Statamic form submissions to Salesforce. Marketers connect a form to a Pardot form handler or to Salesforce Web-to-Lead in the Control Panel, and map each Salesforce field to a form field, without touching code.
The addon adds two connectors to Statamic's form connections (Forms → your form → Connect), next to Email, Webhook and the Forms Pro integrations:
- Pardot: Marketing Cloud Account Engagement form handlers.
- Salesforce Web-to-Lead: creates a Lead in any Salesforce org.
Requirements
- PHP 8.4+
- Statamic 6.44+
- A running queue worker. Submissions are sent on the queue, so a slow or unavailable Salesforce never delays the visitor.
Installation
composer require concept7/statamic-salesforce-connector
Pardot
- In Pardot, create a form handler under Marketing → Forms → Form Handlers. Give each field an external field name, for example
AchternaamorE-mail. - Leave the handler's success and error locations empty. Pardot then answers a rejected submission with its error page, which the addon detects and logs. With an error location set, a rejection is a redirect, and a redirect is logged as a failed delivery.
- In Statamic, open the form, go to Connect → Pardot and add a connection:
- Form handler URL: the handler's URL.
http://andhttps://are both accepted. - Fields: one row per external field name, with the value to send.
- Form handler URL: the handler's URL.
Web-to-Lead
- Find your Organization ID in Salesforce under Setup → Company Information → Salesforce.com Organization ID.
- In Statamic, open the form, go to Connect → Salesforce Web-to-Lead and add a connection:
- Organization ID (oid).
- Debug e-mail (optional): Salesforce mails the result of every submission to this address. Use it while setting up, and leave it empty in production.
- Fields: standard field names such as
last_name,emailandcompany, or the id of a custom field (00N…).
Salesforce answers every Web-to-Lead post with a 200, also when it drops the lead. The addon can only detect connection errors and error statuses; use the debug e-mail to check a new setup.
Field values
- Type
@in a value to insert a form field. A value can mix fields and text, for example@Street @Number@Addition. - Select, radio and checkbox fields send the stored option key, not the label people see. Salesforce picklists match on the key.
- Several values (checkboxes) are joined with a semicolon:
a;b. This is the Salesforce multi-select format. - A toggle sends
1or0. - Values are trimmed. Empty values are not sent, so a blank field never overwrites data Salesforce already has.
- Conditions send a connection only when the submission matches. Disable a connection with its toggle.
Users need permission to configure forms to edit connections.
Delivery and logging
Each connection is sent by a queued job, with 3 tries and a backoff of 10, 60 and 300 seconds.
| Response | Result |
|---|---|
| 2xx without Pardot error text | Delivered |
| 200 with Pardot error text | Rejected: logged, not retried |
| 3xx | Rejected: logged with the redirect target (without its query), not retried |
| 5xx, 4xx or no connection | Retried; logged when the last try fails |
A failed delivery is logged as an error with the form handle, the connector and the HTTP status. Field values and response bodies are never logged: they can contain personal data.
Testing
composer install vendor/bin/pest
License
Salesforce Connector is commercial software. It requires a license from the Statamic Marketplace for use in production; local development is free. See LICENSE.md.

