WP ERP
WP ERP is a WordPress HR, accounting, and CRM plugin by WeDevs. Advanced Form Integration creates contacts in WP ERP’s People module from your form submissions, so every sign-up, enquiry, or registration lands directly in your CRM without manual entry.
What you’ll need
- The WP ERP plugin installed and activated on the same WordPress site.
- The Advanced Form Integration plugin installed and activated.
WP ERP runs on the same WordPress installation as AFI, so there is no API key or OAuth connection to set up. AFI calls WP ERP’s erp_insert_people() function directly.
Create the integration
- Go to AFI → Add New.
- Give the integration a name, for example
Contact form to WP ERP. - Under Trigger, pick the form plugin and the specific form you want to listen on.
- Under Action → Platform, select WP ERP.
- In Task, choose Add Contact.
- Map your form fields onto the WP ERP fields listed below.
- Optional: open Conditional Logic to limit which submissions are sent.
- Click Save Integration.
Tasks supported
Add Contact
Creates a new contact in WP ERP’s People module via the erp_insert_people() function. If a contact with the same email already exists, WP ERP matches and updates it. The contact type is set to contact (WP ERP’s standard CRM type).
| Field | Field key | Required | Notes |
|---|---|---|---|
email |
Yes | Existing contacts are matched by email | |
| First Name | first_name |
No | |
| Last Name | last_name |
No | |
| Phone | phone |
No | |
| Company | company |
No | |
| Website | website |
No |
Conditional logic example
Only send contacts to WP ERP when the form’s email field is not empty, so incomplete submissions do not create partial records. Add a condition: Email is not empty.
Troubleshooting
Nothing arrives in WP ERP
Open AFI → Log and find the most recent entry. If there is no log entry at all, the trigger never fired: re-check the form selection and submit a real test entry from the front end rather than the form builder preview.
Contact not created
WP ERP validates the email field. If the email is missing or malformed, erp_insert_people() returns an error. Check the AFI log for the response and make sure the email field on your form is mapped correctly.