Skip to main content

Marketing sites have long been using PHP to serve up content and process web forms. An important part of a marketing site is taking these inbound leads and placing them in CRMs or tools to be acted on quickly. The Salesloft API allows your team to place your web leads in Salesloft as people, adding them to a cadence to be handled quickly.

PHP Handler provides the PHP web form handler documented here.

index.php provides a barebones web handler. The web form (index.php) will submit the first name, last name, and email address of the lead. The lead is then processed through the handler, creating a person in Salesloft and then adding that person to a cadence.

The key areas of this code are the cURL requests to post data to the API:

$createdPerson = postData(SALESLOFT_API_BASE . "/people.json", $personData);


$addedToCadence = postData(SALESLOFT_API_BASE . "/cadence_memberships.json", array("person_id" => $personId, "cadence_id" => SALESLOFT_CADENCE_ID));

These requests have a few things going on for them that you'll need to make sure you include:

  • API_KEY - This API key would be generated specifically for your team, and should generally be from a higher permission account, depending on your use case. For instance, if you would like to add to a cadence on behalf of different users on the team, the authenticated account must be an admin.
  • CADENCE_ID - There is a lot that you could do with what cadence to add to. The simplest way is to have a single cadence that you are adding to from a form. However, you could have multiple cadences per multiple forms, or even multiple cadences for a single form and run A/B tests on them.

Additional Ideas

Web forms + Salesloft can be a powerful tool for your inbound process, including things like round-robin inbound leads, web form -> SFDC lead / contact, or even just a simple submission. If you have an idea but don't know how you would achieve it, please contact our integrations team at