The snippet from this article can be used for HubSpot Embedded Forms or Calls-to-Action (CTAs).
Embedded Forms will only work if built via Legacy Form Editor due to a limitation with the New Form that does not support existing developers' features, like the Global form events.
In this article, we will cover the steps required to implement Chili Piper with HubSpot Forms
Table of Contents
HubSpot Setup
First, we will share some steps that need to be done on HubSpot's side to ensure a smooth integration with Chili Piper.
1. Disable Redirect
To ensure that Chili Piper loads when the form is submitted, disable any complete page redirects in HubSpot; otherwise, the redirect might be triggered first, and prospects will not see calendar slots to book a meeting.
Chili Piper can add a redirect after booking within the Inbound Router settings.
You may need to disable the redirect on both the form and the landing page separately. Disabling it in one place may not disable it in both.
Landing Page
- In the left-hand menu, navigate to Content > Landing Pages
- Click the landing page you want to edit
- Click the form, and a menu will launch on the left. Scroll down until you find Thank you. Set as below, using the Display an inline thank you message option.
HubSpot Forms Editor
- Navigate to Marketing > Forms in HubSpot's left-hand menu:
- Hover the mouse on the form you want to update, and click Edit:
-
Select the Thank you message option in the Options tab.
- Click update in the top-right once done.
2. Finding the HubSpot FormID
HubSpot Embedded Form
If you have multiple forms on your landing page and want Chili Piper triggered only for these forms, you must specify these HubSpot FormIDs in the snippet. If this is not your case, this step can be skipped.
-
Navigate to Marketing > Forms.
- After clicking on the form, you should be able to find it in the browser's URL. You can also click the "Embed" button at the top right and see it in the pop-up that will open afterward.
HubSpot Calls-to-Action (CTAs)
- In HubSpot, navigate to Marketing > CTAs in the left-hand menu:
- After clicking on the form, you should be able to find it in the browser's URL:
Chili Piper Setup
Now, it's time to move to Chili Piper to finish the setup in-app and get ready to receive meetings!
1. Set up your Data Fields
Data Fields are reusable properties used throughout the Chili Piper's Demand Conversion Platform platform. They allow you to capture visitor data against a data type structure and sync it to mapped CRM fields.
Check this article to learn how to set up your Data Fields. If you have already done it, proceed to the next step.
2. Map your Webform
We must map all relevant form fields in the Concierge Router's Trigger. This step is required to ensure Chili Piper can collect the data submitted by your prospects and use them in your Routing Rules.
- In the left-hand menu, under Concierge, click Routers
- Open the Router you want to embed and click the Trigger. If you do not have a Router yet, click the Create Concierge Router button in the top-right and the Trigger will open immediately.
- Enable the Webform is submitted option in the Trigger
- Now, we need to ensure all relevant form fields are mapped in the Trigger. Take benefit of the Find Form button to auto-map your form fields and save some time!
We recommend checking this article for a more detailed view of form mapping.
3. Copy your JavaScript Snippet
Once your form mapping is ready, it's time to collect the JavaScript snippet we will use to embed Chili Piper on your landing page.
- On the Router's page header, click Embed
- Click Show next to On a Website
- Select HubSpot in the Form Type dropdown
- If you have multiple forms on your landing page, you will likely want Chili Piper triggered only for these forms. If that's not your case, skip to step #5. If that's the case, paste the HubSpot FormID collected previously in the FormIDs field.
- Click Copy in the Code Snippet box to copy your Snippet. The variables (domain and router names, and formIDs - if applicable) are already applied to the Snippet.
Test and Deploy your Snippet
Before moving to production, we always recommend testing in a Staging/Testing environment to ensure everything works as expected.
- In the left-hand menu, navigate to Content > Landing Pages
- Click the landing page you want to edit
-
Add your Snippet to your testing landing page in Settings -> Advanced (options) -> Footer HTML
- Once your tests are completed successfully, you can follow the same steps above to include the Snippet in your Production landing page.