Who can use this feature?
Chili Piper offers a server-to-server API endpoint for calling our booking workflow. This allows you to programmatically automate the display of a queue’s calendar.
In this article, we will cover what request body parameters to send with this endpoint, custom URL parameters, and error codes in more detail.
This article is dedicated to users who already migrated to our Demand Conversion Platform instance. If you have not been upgraded yet and are still working on our Legacy platform, check this article instead.
Table of Contents
Request Description & Syntax
Trigger Option: Choosing the correct one
With our REST API, Concierge won't be launched using our JS snippet. Instead you can use one of our triggers from the router to determine the source of the data. Either of:
A) Button is clicked in-app
This option sets up a simple data field mapping. You will need to follow the form structure that includes data fields with this method
With this option selected, you rely on the data field mappings as they appear here.
The POST request body requires the actual data field names. To get these, go to the "Embed" tab in the router.
For example:
{
"form": {
"PersonEmail": "email@domain.com",
// Other data fields as you add them
}
}
B) Webform is submitted
With this option selected, we reference the "Form Field Names" within the form object.
{
"form": {
"Email": "email@domain.com",
// Other field names as you wrote them
}
}
Optionally, you could append the POST URL with query parameters instead to pass as form values pre-populated.
For example we could append the Email and name value directly as ?Email=email@domain.com&FirstName=Test
https://fire.chilipiper.com/concierge-router/router-name/rest?Email=email@domain.com&FirstName=Test
And if you append query parameters to the URL, you do not need to include them in the form object.
POST Body and Custom Options
The Body of the request will contain:- Form fields: the Data Fields that you have added in Trigger
- Additional options for your form like locale, etc (see below)
Note that all "options" are optional.
{
"form": {
"PersonEmail": "email@domain.com"
},
"options": {
"dynamicRedirectLink": "http://",
"router": "new-router-name",
"locale": "en-US",
"accountId": "",
"campaignId": "",
"status": "",
"caseId": "",
"objectId": "",
"opportunityId": "",
"disableRelation": false,
"event": {
"sfdc_field__c": "custom value"
},
"meetingTypeId": "158336c7-5b15-4bd5-b48e-6887231b8b55",
"trigger": "ThirdPartyForm"
}
}
API Option Descriptions
Please refer to the options object listed above. All options are optionally provided, so you don't need to provide values for them if you don't plan on using them.
All values default to undefined / null unless expressly stated below.
dynamicRedirectLink
(string)
Defines the URL to which the user will be redirected after submission. Should be prefixed with "http://" or "https://"
router
(string)
defaults to router-slug value from POST URL
Specifies the name of the Chili Piper router to be used. Note that this will overwrite the value provided in the router-slug of the POST URL. So if your POST URL contains "new-router-name" but you specify a value of "old-router", then old-router will be used.
locale
(string)
default: "en-US"
Forces a specific language for the Chili Piper calendar.
The values for the parameter "locale" should use the ISO 639-1 code; if a country is not supported, Chili Piper will default to English. Chili Piper has published our list of supported languages, which is updated periodically.
accountId
(string)
The Salesforce ID of an Account. Forces a Contact to be created under the specified Account. Accepts both 15 and 18-digit Salesforce AccountId values
campaignId
(string)
The Salesforce Campaign ID associated with the prospect (Lead/Contact). Accepts both 15 and 18-digit Salesforce AccountId values
status
(string)
Defines the campaign member status value in Salesforce.
caseId
(string)
The Salesforce Case ID associated with the event. Accepts both 15 and 18-digit Salesforce AccountId values
objectId
(string)
Used for associating the meeting with a specific object in Salesforce. Typically used for custom objects. Accepts both 15 and 18-digit Salesforce AccountId values
opportunityId
(string)
The Salesforce Opportunity ID associated with the event. Accepts both 15 and 18-digit Salesforce AccountId values
disableRelation
(boolean)
default: false
Decouples the Event record from the associated Lead or Contact in Salesforce. It removes the WhoId value from the Event record, unlinking it from specific Contacts or Leads.
Consider using this setting only if you have a custom workflow in Salesforce for associating your Events.
We also recommend discussing this option with your Chili Piper CSM to ensure it aligns with your Salesforce integration needs.
event
(object)
Passes custom field values to the Event object.
options:{
event: {
your_custom_field__c: "your custom value",
// add as many fields as needed to be populated
},
}
meetingTypeId
(string)
Forces a specific Meeting Type to be used by ID. This overwrites whatever is actually defined within the Concierge route path used to display calendar.
Be careful, as all settings associated with the Meeting Type you use will also be taken into consideration during the booking process.
The format of these IDs is usually a UUID that you can find by viewing the Meeting Type within Chili Piper's UI.
options:{
meetingTypeId: "158336c7-5b15-4bd5-b48e-6887231b8b55",
}
trigger
(string)
default: InAppButton
Defines the method of initiating the workflow. See above for more details on choosing the right trigger. Options relevant to our REST API include:
-
ThirdPartyForm
-
InAppButton
(default) -
RouterLink
Response
https://fire.chilipiper.com/concierge-router/new-router-name/rest
Our response returns the URL value of the correct routed calendar based on the inbound Concierge Router you define. Your team then serves this URL to the user in an iFrame embed, redirect, or in another manner.
{
"routingLink": "https://fire.chilipiper.com/concierge-router/new-router-name/routing/ba9da090-3359-42d0-b248-1753791c2c3a?dynamicRedirectLink=http%3A%2F%2Fchilipiper.com",
"url": "https://calendar.chilipiper.com/concierge-router/new-router-name/routing/ba9da090-3359-42d0-b248-1753791c2c3a?dynamicRedirectLink=http%3A%2F%2Fchilipiper.com",
"timeoutInMS": 600000,
"timeoutRedirectUrl": null
}