BotPenguin Chatbot Leads CRM Integration

If you are using BotPenguin Chatbot to capture leads on your WhatsApp, Facebook or Website, you can easily bring those leads into your Sembark Travel CRM using API Integration. Bringing your bot-generated leads into your Sembark Travel CRM Dashboard will allow you to easily manage your Travel Enquiries and send package quote details with the customers.

This is a step-by-step guide on how to connect BotPenguin Chatbot flows with your Sembark Travel CRM.


Before proceeding further, you must have subscriptions for both Sembark Travel Software and BotPenguin Chatbot. Furthermore, please ensure that you already have at least one chatbot and one chat flow on your BotPenguin account.

Integration Overview

During your chat flows, you will be setting some enquiry questions such as "What is your Name?" or "What is your Travel Budget?". And by integration, we want to bring the answer to these question into the CRM. For example, if the customer answers with INR 15,000 for the "What is your Travel Budget?", we would like to reflect the INR 15,000 into a Budget (attribute) field into our CRM. To do that, we want to capture the answer for "What is your Travel Budget?" into the Budget (attribute) and then send the Budget (along with other data fields) to Sembark Travel CRM using the APIs.

Sample Chatbot Flow

For the purpose of this guide, we will assume that you have following questions in your chatbot flow.

What is your full name?

Please provide your Phone Number details.

1. Create BotPenguin Custom Attributes

Custom Attributes on BotPenguin allows us to store (label) the answer to questions from the flows of our Chatbots e.g. Name attribute for the question "What is your full name?". If you are familiar with templates (Hi {{1}} in SMS or WhatsApp Templates etc.), these attributes are similar to Template Placeholder or Variables. To store the answers, we will add one attribute for each of our questions.

For the purpose of this guide, we want to add two custom attributes: Name and Phone Number. Please follow the official documentation from BotPenguin for latest information on how to add custom attributes. Below is a sample mapping of custom attributes with their respective questions. Please use the appropriate values based on your bot chat flow and questions.

# For Name attribute

Attribute Key: name
Attribute Name: Name
Select Bot: <select any of your bot>
Select Flow: <select the flow from the bot>
Select Question: "What is your full name?"

# For Phone Number attribute

Attribute Key: phone_number
Attribute Name: Phone Number
Select Bot: <select any of your bot>
Select Flow: <select the flow from the bot>
Select Question: "Please provide your Phone Number details."

Similarly, add a custom attribute for the questions from your chat flow. Once you have added the custom attributes, the BotPenguin will automatically store the answer to the questions into respective attribute. Now, it is time to setup the API. To setup the Sembark API, we will need an access token.

2. Generate Access Token in Sembark Dashboard

Open you Sembark Dashboard and visit your Organization's settings (Top Right > User Icon > Organizations > Settings) and click on Integrations Tab.

Don't see Integrations Tab?

The Integrations on Sembark Dashboard are enabled on per-request basis. Please send a message into our support group to enable it for your ogranization. Also, you must be an Admin of your Sembark Dashboard to create new Integrations.

Next, click on Add Integration button which will redirect the new integrations page. Here, provide a name and the description. The name of the integration will become the Trip Source in your query flow. For the purpose of this guide, we will "BotPenguin" as the name and "Leads from BotPenguin Chatbots" as the description of this integration. Click on the save button and you will be prompted with an access token. Keep the Sembark Dashboard open as we will use this access token in the next step.

Access Token Security

You should NEVER share the Sembark API Access Token with any unauthorized person, software or chat group. If someone gets your token, they can use it to abuse your API usage and corrupt the leads data.

Now that we have generated an access token, let's add an API into the BotPenguin Dashboard.

3. Add API in BotPenguin Developer Settings

Sembark provides Http REST APIs to capture leads from other lead generation software. The setup process of APIs is dependent on the lead generator and sometimes requires computer programming knowledge. But in the case of BotPenguin, it is pretty straightforward, and the API can be added using the UI on the Dashboard. To add an API, please follow the official documentation from BotPenguin of developer settings page.

3.1 Setup Name and URL

Once you open the add API page on BotPenguin, enter the following details in the appropriate input fields.

API Name     : Sembark Travel CRM API
API Method   : POST
Enter API URL:

3.2 API Request Parameters

Next, we will setup the query parameters (i.e. data to send to Sembark API). Click on Query Parameters tab. Here you can see two inputs for name and value, along with an add parameter button to add more data to the API call. These two inputs provide us a way to map our Custom Attributes (e.g. Name, Phone Number) to the Sembark API Request Body (e.g. name, phone_number) which will be shown on your Sembark Dashboard.

As stated earlier, for the purpose of this guide, we have Name and Phone Number information which we want to send to Sembark Travel CRM. First, on the left side of the input, we will enter name and on the right-side input, we will enter / (slash) which will bring the dropdown consisting of our Custom Attributes. Please select the Name from the selection menu. This should fill the right-side input something similar to {{name}}. Next, click on the + add parameter and on the next two inputs. Similar to how we mapped the name field, enter phone_number in the left side and enter / (slash) on the right side. Select the Phone Number from the Custom Attributes dropdown. This should fill the right-side input something similar to {{phone_number}}.

As you might have guessed, here we are simply mapping our Custom Attributes from BotPenguin to Sembark API data fields, which in turn will map the answers (to the respective questions from Custom Attributes) to the Sembark API. That means, if a customer answers, 8989898989 to the "Please provide your phone number.", it will be send as phone_number to the Sembark API.

If you have other questions in your chat flow and have created custom attributes, please follow the sample procedure and map all other attributes to respective fields in Sembark API. Please check out the API documentation on accepted fields.

Don't see a mapping field in Sembark API ?

If you don't see a field available in the API documentation, you can enter any appropriate field name and Sembark API will capture the data. For example, suppose you have a question regarding "Where are you Traveling From?" of the customer and have mapped it to a Custom Attribute named Origin City, then you can send it as Origin City to the Sembark API as well.

3.3 API Headers

Sembark APIs are protected and requires an authentication token for accessing APIs. These access tokens are passed using Authorization header in the API requests. We have already generated the access token in an earlier step on Sembark Dashboard. To enter headers on BotPenguin, click on Headers tab (right next the Query Parameters Tab). Here, we will add two headers: Authorization and Accept.


Setting up Headers is quite similar to how we setup the Query Parameters. There are two inputs for each Header: Header Name and Header's Value.

Click on + add header and ensure we have two rows for headers with 2 inputs (left and right) on each row. Next, enter Accept in the left side of first row input and application/json on the right side. On the next row, enter Authorization in the left side input and Bearer ACCESS_TOKEN. Now, go the Sembark Dashboard where we generated the access token, copy the access token and replace the ACCESS_TOKEN with the copied value. Here is how the mapping should look like (except the access token).

Accept          application/json
Authorization   Bearer 12|LHKSDfasdfasdfhk123hlkhklhlkhkl

3.4 Test API

Once you have entered the header details with access token, it is time to test the API. Click on Test button on this page. This will prompt use to enter the test values for our Custom Attributes. Enter the appropriate details and click on submit. If the API connection is successful, you should see a success message (e.g. Trip Plan Request created.) in the Response section (just below the Test button). Open your Sembark Dashboard and click on Trip Plan Requests from Top left > Trips > Trip Plan Requests. Here, you should see the data that you entered for the Custom Attributes during testing.

Unsuccessful ?

If you see an error message in the Response, please check if the API URL and Headers are properly set. When adding the Authorization header, ensure there is a space between Bearer and the ACCESS_TOKEN. If everything is correct, please contact our support for further assistance.

Now that we have defined the API and have tested it, next we just to modify our chat flow to call the above API.

4. Add API component in your chat flow

Similar to chat components such as Text Question and Image, there is a component called API which will allow us to send the collected data from the chat flow to our API integration which we have just finished. Please check out the official documentation on BotPenguin on how to add the API chat component. You can add this API component anywhere between your existing flow. For the purpose of this guide, we are going to add it at the end of our existing chat flow. Once the API components is added, we will select the Sembark Travel CRM API from the dropdown of the APIs. You should also ensure that the previous component of this Sembark Travel CRM API component directs to the API component. You can confirm that by clicking the previous component and check the settings panel. The chat flow will be automatically saved, or you can manually save it.

5. Test Integration

To test the integration, you should initiate the chat flow from the respective bot e.g. WhatsApp, Facebook or Website for which we have added the API component. Once you complete the conversation with your chat bot, you should see the collected data on your Sembark Dashboard under the Trip Plan Request module.

This completes our integration between BotPenguin and Sembark Travel CRM.


Below are some frequently asked questions regarding further settings.

Q. How to add the Sembark API component in between the BotPenguin Chatbot flow?

You can easily add the Sembark API component in between the flow of your Chatbot in the similar way you would add any other flow such as Text Question or Image to existing flow. The only different is in the settings for next flow. For the API component, there are 3 options to trigger the next flow which is based the API response. You should click on the Sembark API component and check the settings panel. For every option in the settings panel, you should select the next flow, irrespective of API response. This way, even if the API fails, your chat bot will continue the same flow.

Q. Can we add multiple Sembark API components in the one BotPenguin Chatbot flow?

Yes. This is also a great and recommended way to collect and send the data to the Sembark CRM as early as possible as some customers might NOT answer to all the question and can close the chat flow in the middle. This setup will require some modifications in our API setup in the BotPenguin dashboard. Because we will be calling the Sembark API multiple time during the same flow, we need to provide a customer identification to the Sembark API so that multiple call the API will not create multiple leads. Fortunately, Sembark API supports a field called client_request_uid. If we call the Sembark API with same client_request_uid, multiple times, the API will simply merge the new API data with existing data.

Customer Identification Required

To add multiple Sembark API components in the same chat flow, we will have to pass the customer request identification (client_request_uid) to every API request. This client_request_uid MUST be same for all API calls in the same chat flow. Also, this identification should be unique to the current customer, otherwise it may override data from other customers (e.g. if we choose the name as customer identification, there can be multiple customers with the same name and if they enquiry at the same time, all their leads data will be merged together.).

The customer identification will vary based on your chat bot and the chat flow.

  • If you have chatbot on your website and your ask for Email ID of the customer, then you can consider the Email ID as the customer's identification.
  • For WhatsApp chatbot, the phone number can be considered as the customer's identification.

Let's modify the Sembark Travel CRM API on the BotPenguin dashboard. Visit your BotPenguin dashboard and locate our API. Now, click on the settings or edit icon on our API. This will open the API editing page. Here we will go into the Query Parameters tab. Click on + add parameter. On the left side input, enter the client_request_uid and on the right input, enter the / (slash). Now, select the appropriate Custom Attribute which can be considered as the Customer Identification. Click on Save details to save the API.

Next, we need to modify the required chat flow where we want to include the Sembark Travel API component multiple time. Select the existing component after which you want to add the API component. Now configure the settings of the API component and the earlier component to ensure that the next and previous steps are correctly setup.

Only add after Customer Identification Questions are answered.

You should only add the API component after which you have collected the information required for our Customer Identification. For example, if you are using email id as customer identification, then the API component should only be added after the Email component. If we add it before, then the customer identification will be unknown, and the API component will create new leads.


Contact Us

Please feel free to contact us for your queries or demo requests. Provide your contact details and our team will connect you shortly afterwards.

Office Address

1, Plot No 177A, Shyam Enclave Sirsi, Jhotwara
Jaipur, Rajasthan, India - 302034

Specify the type of Travel Company