Skip to main content
Rasika Purohit
Analyst, Platform Evangelism

How to decide which type of entity should be created?

Where am I?

In Haptik you can ask and answer questions and share your experience with others!

Rasika Purohit
Rasika Purohit

There are eight different types of entities you can use. The type of entity to use depends on the use case.

Words and Phrases type of entity should be used when you have a definite set of values that users should provide a value from. For example, types of insurance plans, a list of cities you operate in, and so on.

Number entity only accepts numeric input from the users. You can add the minimum and the maximum number of digits the entity can store.

Regex entity can be used to accept input from the user in a certain pattern, in other words, you can define a regular expression to accept certain input values. For example, order id, insurance number, and so on.

Budget entity accepts the budget entered by users even in text format, for example, if the user is providing input as I am looking for a laptop around 1 thousand dollars then the budget entity converts the text input and captures the value as 1000

Date entity accepts various date formats entered by the user.

Currency entity detects the type of currency the user is providing. for example, if the inputs USD$ 200, then the currency entity will detect the unit as USD and the value as 200.

Time entity accepts various time formats entered by the user. 

Attachment type entity should be used when you want to accept any media type of file from the user. This entity can accept images, documents in pdf, word, and excel format. It also accepts videos on the WhatsApp bot.

Medha Anand
Medha Anand Community Manager

But how should we identify which type suits our requirements? Can you give some examples of usecases for the same?

Varun Deshpande
Varun Deshpande

Words & Paraphrases: List of cities, type of cars, name of hotels, etc.
Numbers: Pincode, Phone number, Order id, etc.
Date: Date of birth, Date of arrival, Date of pickup, Date of appointment, etc.
Time: Time of appointment, arrival time, departure time, etc.

Budget, Currency & Attachment entities seem self-explanatory. 

Medha Anand
Medha Anand Community Manager

This is so useful, thanks a lot for sharing this @Varun Deshpande :)

Related Discussions