This integration is unique for Gravity forms. You must have the Gravity Forms plugin installed on your WordPress site to follow this guide.
How this method works
Gravity Forms will redirect to a thank you page and set the values from the form as query string parameters that we will then use to run Chili Piper.
Create a form and add Chili Piper code
- Create your Gravity Form
-
Create or define a Thank You page to redirect the page to after the form is submitted
-
In the Gravity Form “Confirmation” settings, apply your page redirect setting and pass-thru any values to the redirect using the Gravity Forms configuration
-
- Gravity Form → Settings → Confirmations
-
- Note: You can use the dropdown menu next to the Redirect Query String text box to select which fields to include in your Query string (shown below)
-
In the Gravity Form “Confirmation” settings, apply your page redirect setting and pass-thru any values to the redirect using the Gravity Forms configuration
-
Add this code to your Thank You page, where a prospect is redirected to AFTER a form submission.
-
Replace "DOMAIN" with your Chili Piper account domain and "ROUTER" with a router name.
- You can find those in the Router Settings - Embed for your form
-
Replace "DOMAIN" with your Chili Piper account domain and "ROUTER" with a router name.
<script src="https://js.chilipiper.com/marketing.js" type="text/javascript"></script>
<script>
const tenantDomain = "tenant_domain"; // input your domain name
const routerName = "router_name"; // input your router name
var leadValues = {};
var uri = decodeURIComponent(document.location.search.replace(/\+/g, " "));
var urlParams = new URLSearchParams(uri);
var entries = urlParams.entries();
var valid = false;
for (pair of entries) {
leadValues[pair[0]] = pair[1];
if (pair[0].toLowerCase().includes("email") && pair[1].includes("@")) {
leadValues[pair[0]] = pair[1].replaceAll(" ", "+"); // fix spaces for emails
valid = true;
}
}
if (valid) {
ChiliPiper.submit(tenantDomain, routerName, {
map: true,
lead: leadValues,
});
console.log(leadValues);
}
</script>
- Make a test submission and check the Reports dashboard in Chili Piper:
- In Reports, hover over your test submission and note the field names
- Head over to Forms and create a new form or select an existing one
- In the Form settings, map the fields shown in your test submission report to the appropriate Salesforce object fields.
Publish your page & Test
For testing, submit your form with test data and check that the following occurs:
- The calendar appears
- Your test lead is submitted into Gravity Forms
- Your test lead values are showing up correctly in your Chili Piper Router 'History'.
- If using Salesforce, check that your lead was successfully created and assigned to the Assignee with whom your test meeting was booked.