Salesforce
Overview
The AFI plugin allows you to connect your WordPress forms with Salesforce, enabling automatic creation or update of CRM records in your Salesforce workspace. When someone submits a form on your site, their data can be sent directly to Salesforce as a Lead, Account, Contact, Opportunity, or Case.
Perfect for lead generation, sales automation, and CRM pipeline management.
โ Supported Features
-
Add Lead
-
Add Account
-
Add Contact
-
Add Opportunity
-
Add Case
๐ง How To Setup
Step 1: Connect Your Salesforce Account
Before you can create an integration, connect your Salesforce account using OAuth 2.0 authorization.
Go to:AFI โ Settings โ Salesforce
๐ Click Save & Authorize and follow the steps to connect your Salesforce account.
๐ How to Create a Connected App in Salesforce:
-
Log in to your Salesforce account.
-
Click the Settings gear icon and go to Setup.
-
Under Platform Tools, click Apps โ App Manager.
-
Click New Connected App.
-
Fill in:
-
Connected App Name
-
API Name
-
Contact Email
-
-
Enable OAuth Settings.
-
For Callback URL, use:
https://yourdomain.com/wp-json/advancedformintegration/salesforce -
Select scopes:
-
Full Access
-
Perform requests anytime (refresh_token, offline_access)
-
-
Uncheck Require Proof Key for Code Exchange (PKCE).
-
Save the app and verify your identity (OTP).
-
Copy the Consumer Key and Consumer Secret.
-
Paste them into Client ID and Client Secret fields in the AFI settings.
Step 2: Create a New Integration
Go to:AFI โ Add New
๐ Title
Give your integration a meaningful name (e.g., โWebsite Lead to Salesforceโ)
โ๏ธ Trigger
-
Form Provider: Choose your form plugin (e.g., WPForms, Elementor, Gravity Forms)
-
Form/Task Name: Select the form you want to connect
Step 3: Configure the Action
-
Platform: Choose Salesforce
-
Task:
-
Add new lead
-
Add new Account, Contact, Opportunity, Case
-
This allows multiple records to be created from one form submission.
Step 4: Map Fields
After selecting the task, click Get Fields to load all available Salesforce fields.
๐ Youโll see grouped fields for each entity:
๐น Lead Fields (when “Add new lead” is selected)
-
Company (required)
-
Last Name (required)
-
Email (required)
-
Phone
-
Campaign
-
Owner
๐น Account Fields
-
Name (required)
-
Website
-
Industry
๐น Contact Fields
-
First Name
-
Last Name (required)
-
Email
-
Phone
-
Mailing Address
๐น Opportunity Fields
-
Name (required)
-
Close Date (required)
-
Stage
๐น Case Fields
-
Subject (required)
-
Description
-
Priority
๐ Owner
Select the Salesforce user to assign as the record owner.
๐ Campaign
When adding leads, you can assign them to a campaign.
Step 5: Save Integration
Click Save Integration at the bottom.
๐ Done! Now your form will send data to Salesforce automatically when submitted.