Attribute
Chakra models are designed to be not only customizable but to conform to the data model of the business usecase. The most granular part of this data model is called an attribute. Think of it as a field in a database table or a column in an excel sheet.
For example lets build a lead Data model with 3 fields name, city, phone_number. Each of these fields are modeled as Attribute in the Chakra system. the data
field of a lead object will contain key:value pairs as an json object - each pair representing a single attribute.
This kind of modeling has many advantages
Bring your own data model
You can design processes in Chakra which conforms to your data model
Complex data types
Apart from standard attribute types like string, number and boolean - you can also store complex json, nested attributes, api controlled attributes too.
Efficient data storage and transmission
Complex systems over time can have hundreds and even thousands of attributes per model. This is not a problem as storage is only proportional to what data is being stored and not how many attributes you have.
Attribute Types
Following are a list of attribute types that are supported right now
name | datatype | description |
---|---|---|
string | string | |
integer | integer | |
float | float | |
boolean | boolean | |
text | string | |
stringId | string | ID field of string datatype |
integerId | integer | ID field of integer datatype |
stringEnum | json | Enum field of string datatype |
integerEnum | json | Enum field of integer datatype |
floatEnum | json | Enum field of float datatype |
multiStringEnum | json | Multi-value Enum field of string datatype |
multiIntegerEnum | json | Multi-value Enum field of integer datatype |
multiFloatEnum | json | Multi-value Enum field of float datatype |
name | string | Used to store names |
string | used to store emails | |
phone | string | Use this to store phone numbers |
number | integer | |
decimal | float | |
date | integer | |
photo | string | Attribute to store photos |
multiPhotos | string | Used to store a list of photos |
audio | string | Used to store audio data |
time | integer | Used to store just the time information |
datetime | integer | Store entire datetime data in epoch milliseconds format |
datetimeISO8601 | string | Used to store datetime in ISO format |
monthOfYear | integer | Used to store month of a year as an integer |
json | json | Used to store a json object |
geolocation | json | Geolocation coordinates stored as [latitude, longitude] format |
record | string | Used to store a record reference |
recordCollection | json | Used to store a list of record references |
process | string | Used to store a process reference |
processCollection | json | Used to store a list of process references |
task | json | Used to store a task reference |
taskCollection | json | Used to store a list of task references |
url | string | Used to store a url like https://chakrahq.com/ |
username | string | Used to store the username of a chakra user |
html | json | Used to store a html content reference |
externalObject | json | Used to store an object obtained from an external data source |
multiExternalObject | json | Used to store a list of object obtained from an external data source |
googleAddress | json | Used to store an address obtained from a google address lookup |
customObject | json | Used to store a json object with custom defined attributes |
multiCustomObject | json | Used to store a list of json objects with custom defined attributes |
textarea | string | Used to store text obtained from a textarea |
user | string | Used to store reference to a chakra user |
state | string | Used to store reference to a chakra state |
otp | json | Used to store otp captured from the otp attribtue |