PHPackages                             lukeyouell/craft-salesforceleads - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. lukeyouell/craft-salesforceleads

AbandonedCraft-plugin[API Development](/categories/api)

lukeyouell/craft-salesforceleads
================================

Generate Salesforce leads from form submissions.

1.2.1(7y ago)172.3k2[3 issues](https://github.com/lukeyouell/craft-salesforceleads/issues)MITPHP

Since Feb 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/lukeyouell/craft-salesforceleads)[ Packagist](https://packagist.org/packages/lukeyouell/craft-salesforceleads)[ RSS](/packages/lukeyouell-craft-salesforceleads/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (1)Versions (11)Used By (0)

[![icon](src/icon.svg)](src/icon.svg)

Salesforce Leads plugin for Craft CMS 3.x
=========================================

[](#salesforce-leads-plugin-for-craft-cms-3x)

Generate Salesforce leads from form submissions.

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0 or later.

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require lukeyouell/craft-salesforceleads

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Salesforce Leads.

Usage
-----

[](#usage)

Your form template can look something like this:

```

  {{ csrfInput() }}

  Name

  Email Address

  Message

```

### Salesforce Parameters

[](#salesforce-parameters)

The following Salesforce parameters are available **but must contain hashed values** to prevent tampering.

NameRequiredDefault Value`oid`NoValue set in settings/config`retURL`NoCurrent site base url`lead_source`NoNull`Campaign_ID`NoNullThe above field names are **case-sensitive**.

### Redirecting After Submit

[](#redirecting-after-submit)

If you have a `redirect` hidden input, the user will be redirected to it upon successful submission. Again, this must be a hashed value.

If you **don't** have a `redirect` hidden input, the plugin will respond with json.

### Honeypot Captcha

[](#honeypot-captcha)

To configure the Honeypot Captcha, go to Settings → Salesforce Leads and choose a param name that your honeypot field should have.

Then edit your form template(s), adding the honeypot field:

```

```

You can hide the field with CSS:

```
.hidden {
  display: none;
}
```

### Email Validation

[](#email-validation)

If you have the [Email Validator](https://github.com/lukeyouell/craft-emailvalidator) plugin installed you can validate the email addresses being used to submit Salesforce leads.

To configure the Email Validator, go to Settings → Salesforce Leads, choose a param name that your email field should have and toggle the validation processes you wish to enforce.

### Ajax Submissions

[](#ajax-submissions)

You can optionally post contact form submissions over Ajax if you’d like. Just send a POST request to your site with all of the same data that would normally be sent:

```
$('#myForm').submit(function(ev) {
  // Prevent the form from actually submitting
  ev.preventDefault();

  // Send it to the server
  $.post({
    url: '/',
    dataType: 'json',
    data: $(this).serialize(),
    success: function(response) {
      if (response.success) {
        alert('Successful submission.');
      } else {
        alert('An error occurred. Please try again.');
      }
    }
  });
});
```

### Handling Responses

[](#handling-responses)

We are posting to Salesforce using a HTTP POST request, so we don't receive any meaningful feedback. The request will only error if there is a problem with the request itself.

#### Successful

[](#successful)

```
{
   "success": true,
   "statusCode": 200,
   "reason": "OK",
   "body": "\r\n\"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\n\n\n\n\nif (this.SfdcApp && this.SfdcApp.projectOneNavigator) { SfdcApp.projectOneNavigator.handleRedirect('https://www.yoursite.com/'); }  else if (window.location.replace){ window.location.replace('https://www.yoursite.com/');} else {;window.location.href ='https://www.yoursite.com/';} \n",
   "payload": {
      "Campaign_ID": "FA4316257629E",
      "name": "Joe Bloggs",
      "email": "joe.bloggs@email.com",
      "message": "Ut felis ipsum, pulvinar id elit in, tempor sagittis lacus. In lectus quam, consequat eu nibh vel, maximus lobortis sapien.",
      "oid": "936A151D88D8C",
      "retURL": "https://www.yoursite.com",
      "lead_source": "Web"
   }
}
```

#### Unsuccessfull

[](#unsuccessfull)

```
{
   "success": false,
   "reason": "Error message will be shown here",
   "payload": {
      "Campaign_ID": "FA4316257629E",
      "name": "Joe Bloggs",
      "email": "joe.bloggs@email.com",
      "message": "Ut felis ipsum, pulvinar id elit in, tempor sagittis lacus. In lectus quam, consequat eu nibh vel, maximus lobortis sapien.",
      "oid": "936A151D88D8C",
      "retURL": "https://www.yoursite.com",
      "lead_source": "Web"
   }
}
```

Salesforce Leads Roadmap
------------------------

[](#salesforce-leads-roadmap)

Some things to do, and ideas for potential features:

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~37 days

Recently: every ~28 days

Total

9

Last Release

2714d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1fbc5aac79249c9e0a365480ed8dfa44090d825068482f7199ce767a1ad3dfc2?d=identicon)[lukeyouell](/maintainers/lukeyouell)

---

Top Contributors

[![lukeyouell](https://avatars.githubusercontent.com/u/24975058?v=4)](https://github.com/lukeyouell "lukeyouell (32 commits)")

---

Tags

cmsCraftcraftcmscraft-pluginsalesforcesalesforce leads

### Embed Badge

![Health badge](/badges/lukeyouell-craft-salesforceleads/health.svg)

```
[![Health](https://phpackages.com/badges/lukeyouell-craft-salesforceleads/health.svg)](https://phpackages.com/packages/lukeyouell-craft-salesforceleads)
```

###  Alternatives

[wrav/oembed

A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.

36205.0k3](/packages/wrav-oembed)[craftpulse/craft-typesense

Craft Plugin that synchronises with Typesense

122.7k](/packages/craftpulse-craft-typesense)[jsmrtn/craftagram

Grab Instagram content through the Instagram API

141.3k](/packages/jsmrtn-craftagram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
