This article outlines how to run Chili Piper using query string parameters. If you have a redirect configured to pass through form field values and reconstruct a URL such as the following:
Then, you can automatically load the Chili Piper script on the thank you page we are redirecting to and load the calendar.
When can this be helpful?
-
Email Campaigns. i.e., CTA to "Book meeting" clicked from an email → redirected to a landing page with query string parameters appended to the URL → Load your Chili Piper router on the landing page using the query string parameters added from the Email CTA.
-
Full Page form redirects - i.e., Form Filled → Redirect to a Thank You Page with query string parameters appended to the URL → Load your Chili Piper router on the landing page using the query string parameters added from the Form submission.
- Chat tools - i.e. Drift, Intercom, etc.
The article will cover:
- Customize ChiliPiper.getQuery
- Add it to your page
*Please note the above is just an example of the URL format and isn't meant to run Concierge.
Customize ChiliPiper.getQuery:
<script src="https://js.chilipiper.com/marketing.js" type="text/javascript"></script>
<script>ChiliPiper.getQuery("account", "router", { queryVariable: "Email" })</script>
Where account is your Chili Piper Account Name & router is the name of your router as it appears in the code. These values can be found with your Concierge || Inbound Router settings:
In the example above, the first string , calendar, is the account name, and the second string, prod-testing-router, is the router name.
Add queryVariable is required so that the Chili Piper script will only run if the Query String contains the Email variable. This can be adjusted. Otherwise, we are looking for email by default.
The Chili Piper script will not run if an email address is not provided so that we do not error out and cause a meeting to be booked where no calendar invite is sent to the customers/prospects. The option below defines which value must be in the URL to run correctly.
{ queryVariable: "Email" }
Form mapping will be applied automatically to map your query string variables to the Chili Piper fields in your related Chili Piper form.
If you do not see Chili Piper run, you will want to ensure that email is correctly mapped as Email for the Form field name in the form mapping associated with your router:
Add it to your page
Add this script to the body of your thank you page and test!