Using Entity Dictionary with Commerce+ Chatbots
- Getting Started
- Bot Building
- Smart Agent Chat
- Conversation Design
-
Developer Guides
Code Step Integration Static Step Integration Shopify Integration SETU Integration Exotel Integration CIBIL integration Freshdesk KMS Integration PayU Integration Zendesk Guide Integration Twilio Integration Razorpay Integration LeadSquared Integration USU(Unymira) Integration Helo(VivaConnect) Integration Salesforce KMS Integration Stripe Integration PayPal Integration CleverTap Integration Fynd Integration HubSpot Integration Magento Integration WooCommerce Integration Microsoft Dynamics 365 Integration
- Deployment
- External Agent Tool Setup
- Analytics & Reporting
- Notifications
- Commerce Plus
- Troubleshooting Guides
- Release Notes
Table of Contents
Overview
Given the limitations of the Commerce+ platform, bot builders rely on Haptik bots to collect entities that are defined in the entity dictionary of Conversation Studio. Without such entities, Commerce+ flows may not function properly (for instance, when a pincode is mandatorily required to show products that are available in that pincode).
Also, bot builders might also wish to use an entity collected by the Haptik IVA as a variable in a bot response. This helps to personalize or customize the responses based on the chat/user context.
The Unified Pipeline setup allows bot builders to conveniently collect and use entities that are required by Commerce+ bots, but are defined using Conversation Studio’s entity dictionary. The steps to do so are described below.
Defining Required Entity on Conversation Studio
Open any node, navigate to the Bot Responses section of that node and click on Add More Entities to open the entity dictionary of Conversation Studio, as can be seen below.
Configure the desired entity in the entity dictionary. Add an entity reprompt message to prompt the user if the required entity hasn’t already been collected previously in the chat.
Click on Save on the top right corner to save this entity and move to the next step.
Defining Required Entity on Commerce+
Open the Taxonomy Sheet for the client using Creator Studio. The below screen will appear.
In the sheet titled Classes Taxonomy, create the required entity as a class, and assign the extraction_method value as input, as below.
Making the Entity Mandatory for Specific Commerce+ Intents
In the sheet titled Intent_Wise_Classes_To_Ask, add the list of C+ intents that require entities, and add the entity defined in the Classes Taxonomy sheet.
In the sheet titled Haptik_To_Commerce_Entity_Mapping, do the following:
- In the column named commerce_entity, enter the entity name defined in the Taxonomy sheet.
- In the column named haptik_entity, enter the entity name defined in the entity dictionary of Conversation Studio, with which the C+ entity has to be mapped.
With these steps in place, the chatbot will start seeking out the required entity as configured on Conversation Studio, before processing relevant intents.
Using Entities as Variables in Commerce+ Bot Responses
Bot builders wanting to use an entity fetched by the Haptik chatbot as a variable in a bot response, can do so by using a new key called haptik_collected_entities.
In this case, the bot builder must use the Commerce+ entity name defined in the Classes Taxonomy sheet, and NOT the entity name assigned on Conversation Studio.
In the below example, the bot response uses a collected entity (name) as a variable, provided that the variable is present in the chat context:
{$search_response.show_result == true; $search_response.error_type not in no_matching_entities; $search_response.total_carousal_count > 1; $semantic_components.deduced_subcategory == cookware storage; $semantic_components.all_added_preferences contains baking & roasting; $haptik_collected_entities contains name :: Hi <b> $haptik_collected_entities.name </b>, here are my top recommendations from the <b> $semantic_components.deduced_subcategory </b> section for you! </br> </br> 💡 Choose bakeware organizers with easy access and adjustable features for convenience.
In this example, if the user’s name is collected, or is already present in the Haptik bot’s chat context, the bot will address the user by their name.
Note
Once an entity is created in the dictionary, bot builders do not need to add such entities to any node. As long as the entity is referred to within the C+ configuration, all entity related settings will function properly.
If an entity is already present in the chat context, the chatbot will directly use that entity, instead of prompting the user to re-share it.
Feature Limitations
The entity reprompt message is the ONLY prompt message that will be used to prompt users to provide the required entity. Therefore, the same message will be shown both while prompting the user for the first time, and while re-prompting the user if the input is not correctly received.
Bots can fetch only 1 entity at a time for Commerce+. If a Commerce+ chatbot requires 2 or more entities, the user will be prompted individually for each entity, till all the required entities are collected.