Chili Piper can capture hidden form data to route your app users to specific teams like support. No form-fill is needed as all information is gathered through the login session.
In this article, we will walk through:
How do I set up In-App calls to Chili Piper?
First, you will need to set up a lead object. Depending on your CRM and whether you're updating any fields on the prospect's object, the fields you use may vary. In most cases, an "Email" field is required.
Option 1
Below is an example of code used to call Chili Piper. The first line loads the Chili Piper JS library into the browser. The following lines are for the API call that triggers the router on a button click.
In this example, we're populating 3 fields: FirstName, LastName, and Email from a Global Window variable, but you can populate these from anywhere they are stored eg: Session endpoint, Server-side session, cookie, global variable, and so forth. This will depend on how your app stores user data.
<button id="inappSubmit">Book a call</button>
<script src="https://js.chilipiper.com/marketing.js" type="text/javascript"></script>
<script>
document.getElementById("inappSubmit").addEventListener("click", function(e){
ChiliPiper.submit("DOMAIN", "ROUTER", {
lead: {
FirstName: window.firstname,
LastName: window.lastname,
Email: window.email
}
});
});
</script>
DOMAIN and ROUTER will be references to your actual account subdomain and the name of the router you want to route to (Default is inbound-router).
Option 2
If you want to use a router's booking link within your marketing automation, mailer, chat, in-app button and so forth this is possible by obtaining the router's embed link from the Inbound Router settings.
Browse to your Inbound Router and open the "Embed for your form" section. Copy the URL:
In this case, you could load a router link directly into an iframe in-app. You can pass the user's email address onto the end of the queue link with an ID “smart tag.” If the person is already in Salesforce or HubSpot, this ID tag will make it so they don’t need to fill out any forms before booking a meeting.
Example router link:
https://DOMAIN.na.chilipiper.com/ROUTER-NAME?id=test@test.com&LastName=test
To pass hidden form field values, simply append them as query parameters on the end, as the example above shows above with &fieldname=value
To learn more about smart tags, see the article here.
Option 3
An alternative option could be used if you only need to route through one queue (e.g., a simple round-robin).
In this case, you could load a queue link directly into an iframe in-app. You can pass the user's email address onto the end of the queue link with an ID “smart tag.” If the person is already in Salesforce or HubSpot, this ID tag will make it so they don’t need to fill out any forms before booking a meeting.
One limitation is that if you wanted to pass any custom fields or data through based upon the page or option selected, you wouldn't be able to customize this. If you'd like to do that, see Option 1.
Example queue link:
https://DOMAIN.na.chilipiper.com/book/QUEUE-LINK?id=test@test.com
You would pass the email address the same way as the above lead object - through your user's existing session.
To learn more about smart tags, see the article here.