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
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.
Note: you may need to change the router name listed in the code to reference the correct router (the default is “inbound-router”).
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.
<script src="https://js.chilipiper.com/marketing.js" type="text/javascript"></script>
<script>
ChiliPiper.submit("account-name", "example-router", {
lead: {
FirstName: window.firstname,
LastName: window.lastname,
Email: window.email
}
})
</script>
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, this ID tag will make it so they don’t need to fill out any forms before booking a meeting.
Example queue link:
https://tryotter.na.chilipiper.com/book/us-inbound?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.