Receiver Platforms

Salesforce

Estimated reading: 2 minutes

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:

  1. Log in to your Salesforce account.

  2. Click the Settings gear icon and go to Setup.

  3. Under Platform Tools, click Apps โ†’ App Manager.

  4. Click New Connected App.

  5. Fill in:

    • Connected App Name

    • API Name

    • Contact Email

  6. Enable OAuth Settings.

  7. For Callback URL, use:
    https://yourdomain.com/wp-json/advancedformintegration/salesforce

  8. Select scopes:

    • Full Access

    • Perform requests anytime (refresh_token, offline_access)

  9. Uncheck Require Proof Key for Code Exchange (PKCE).

  10. Save the app and verify your identity (OTP).

  11. Copy the Consumer Key and Consumer Secret.

  12. 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.


ย 

Share this Doc

Salesforce

Or copy link

CONTENTS