1. Introduction
2. Configuration method
2.1. Initialize the URL used to receive data from outside
CRM Data Platform allows users to import data through many different sources, diversify information, and manage information better. This document is used to guide how to import external data into CRM Data Platform automatically.
To import data into the CRM Data Platform system, users need to initialize the URL for their own account. This URL is used wherever users want to bring data into CRM Data Platform. Each user account can register many URLs for many purposes. To create this URL, users need to log in to the system with an admin or owner account to initialize the URL. The specific steps are as below:
Step 1: Settings → choose Other settings → choose Webhook
Step 2: Choose Listener tab and choose Add webhook listener
Step 3: CRM will automatically create it as described above. This is the URL used for the initial user account only, so authentication is not required when transferring data, so users need to secure this URL to avoid SPAM data entering the system.
When customer data is created on the system, in addition to the basic attributes that the data transmitted through the URL, CRM also allows attaching some default parameters or automatically activating a number of activities such as:
To increase security and limit information leakage, you should add a valid IP
Default tag
Attach only 1 card to the newly created customer.
When there is a request to create data sent to the system according to the created URL. If there is customer information, the system will automatically check the existence of the customer on the system based on the information in the following fields in the customer information. rows: contactId, passport, email, phone. If customer information (Contact / Account) already exists on the system, the Tag will not be assigned to the customer. However, if Tag information is already described in the data sent to the URL, do not assign this defined Tag.
Default Contact/Account resource
Set up customer channels for customers created from Contact/Account
Contact/Account customer channel information is only taken from this setting. The data transmitted from the input data will not be accepted for use.
Similar to Tag, the system only sets up customer channels for newly created Contacts/Accounts
Default Lead resource
Set up customer channels for new customers created from Lead
Lead's customer channel information is only pulled from this setup. The data transmitted from the input data will not be accepted for use.
Similar to Tag, the system only establishes customer channels for newly created Leads
Automatically send emails when creating new customers
Feature allows to send/not send emails to new customers
When allowing sending Emails to new customers, Emails are automatically sent when new customers are created on the system via this URL.
When allowing email to be sent to new customers, the user must set up the email content so that the system automatically sends it..
Automatically send messages when creating new customers
Feature allows to send/not send emails to new customers. TThis feature only applies to accounts that have registered for SMS sending accounts with SMS providers and have set up SMS sending accounts on CRM.
Accounts that do not set up SMS will no longer be able to send after the system's trial SMS sessions expire.
When allowing sending SMS to new customers, SMS is automatically sent when a new customer is created on the system through this URL.
When allowing SMS to be sent to new customers, users must set up the SMS content for the system to automatically send.
2.2. Data structure passed into URL
To import data from outside into CRM Data Platform automatically, users need to follow CRM's data structure standards. With CRM's webhook listener, users need to use the <POST> method to push data through the triggered URL.
The operations that are allowed to be used to automatically import data from outside into CRM Data Platform are:
The general model-flow model of CRM has the following form:
{
senderUser: <email>, is email of user in an org of CRM
data: [
{
"actionType": "add-contact", // required
"data": <data content>
}
]
}
Usage: the user sends an http request to the Listener URL of CRM Data Platform
Parameters description
Parameters | Type | Required | Description |
senderUser | String | Y
| |
data | Array of Object | N | This is a series of interactive actions on CRM |
|
Parameters | Type | Required | Description | actionType | String | Y | The action type of the data information included. There are the following 7 types of actions: | data | Object | Y |
|
|
2.2.1. Data structure for the action of adding a new Contact/Account
If the user wants to enter information and automatically create new contacts on CRM Data Platform, then perform POST data according to the following structure:
{ senderUser: <email> //required data: [ //required { "actionType": "add-contact", //required "data": { //required "name": "", //required "lastname": "", "type": 0, //if want to add new Account then change 0 to 1 "title": "", "passport": "", "gender": [0, 1, 2] // 0: male; 1: female; 2: other "bgInfo"" <Background information>, //String "dateOfBirth": "", "emails": [{type: <email_type>, value: <email>},...], "phones": [{type: <phones_type>, value: <phone_number>},...], "addresses": [{type:<type>, street: <street>, city:<city>, state: <state>, zip:<zip>, country: {code:<country_code>, name:<country_name>}}], "im": [{protocol: <im_type>, value: <im>},...],, "tag": "", //String "cusFields": [{ "name": <custom field name>, "value": <value> }], "permit": { "status": <status_of_permit>, // 1: everybody; 2: onlyme; 3: me+group; 4: me+users "group": <name_of_group>, is group name in an org of CRM "users": [<email_of_user>] is email of users in an org of CRM }, "companyContact": { // remove it if empty or want to add new account "emails": [{value: <email>}], "phones": [{value: <email>}], "name": "" , "websites": [ { "value": "" } ], "addresses": [], "im": [], } } }] } |
Parameters description
Parameters | Data type | Required | Explanation |
senderUser | String | Y
| In this information field, the user replaces <email> with any one of the emails of a user belonging to the registered account. Format according to email format
|
data | actionType | String | Y | |
data | name | String | Y | |
lastname | String | N | |
type | Number | N | - Used to distinguish whether the action will be adding a new Contact or adding a new Account. - If 0 is Contact and 1 is Account - Default will be 0 |
title | String | N | |
passport | String | N | |
gender | Number | N | Gender Information field Default "gender": 2, Explanation:
|
bgInfo | String | N | - Field More information |
dateOfBirth | Date | N | |
emails |
| Object Array | N | [{type: "Work", value: "example1@gmail.com"}, {type: "Home", value: "example2@gmail.com"},...] |
type | String |
| Email type (there are 4 email type in CRM Data Platform: Work, Home, Mobile, Other.) |
value | String |
| Email (format according to email forma) |
phones |
| Object Array | N | Phones Information field Format according to email format Type is Phones type, there are 4 phones type in CRM Data Platform: Work, Home, Mobile, Other. Ex:
[{type: "Work", value: "0905000001"}, {type: "Home", value: "0905000002"},...] |
type | String |
| Phones type |
value | String |
| Phone number |
addresses |
| Object Array | N | Address Information field There are 3 address type: Work, Home, Other.
|
type | String |
| There are 3 address type: Work, Home, Other |
street | String |
| Street name |
city | String |
| City name |
state | String |
| State name |
zip | String |
| Zip code |
country |
| Object |
| Country |
code | String |
| Country code |
name | String |
| Country name |
websites | String | N | |
im |
| Object Array | N | Message Information field There are 6 message type: Skype, Facebook, Yahoo, Viber, Hangouts, Other Ex
[{protocol: "Facebook", value: "facebook_url_"}, {protocol: "Skype", value: "skype_username"},...] |
protocol | String |
| - Message type - There are 6 message type: Skype, Facebook, Yahoo, Viber, Hangouts, Other |
value | String |
| Value of the respective message type |
tag | String | N | "tag": "tag_1, tag_2,...", |
cusFields |
| Object | N | - Option Information field "cusFields": [{ "name": <custom field name>, "value": <value> }], |
- Ex: "cusFields": [{"name": "name_01","value": "value_01"}, {"name": "name_02","value": "value_02"}] - In case the custom field is of type checkbox or Inline checkbox, the values are separated by commas "|" . Ex: "cusFields": [{"name": "What animal do you like?", "value": "Dog|Cat"}] - In case the custom field is of type Date, the format value will be of type YYYY-MM-DDTHH:mm:ssZ. Ex: "cusFields": [{"name": "Ngày bạn nhập học?", "value": "2019-07-08T00:00:00+07:00"}] |
name | String | Custom field name |
value | String | Value of the respective custom field |
permit | Object | N | - Share Information field - There are 4 statuses: All, Only me, I and group, I and employee Ví dụ: - Status: All "permit": { "status": 1 } - Status: Only me "permit": { "status": 2 } - Status: I and group "permit": { "status": 3, "group": "Nhóm Test" } - Status: I and employee "permit": { "status": 4, "users": ["huy.nguyen@htklabs.com","luyt.ngo@htklabs.com"] } |
companyContact |
| Object | N | - Company to which the contact belongs Information field - If there is no information about the Company field, delete it - The Company information field is also a contact, the parameters in Company are like a contact Note: If you want to add a new Account, do not use this field |
emails | Array Object |
| - Email field - Ex [{"value": "crm@beeiq.co"}] |
phones | Array Object |
| - Phone field - Ex [{"value": "0906613999"}] |
name | String |
| - Account name field - Ex "name": "Ngọc Trinh" |
websites | Array Object |
| - Website field - Ex [{"value": "CRM "}] |
addresses | Array Object |
| - Similar to addresses field above |
im | Array Object |
| -Similar to Im field above |
Note:
The fields that will be checked for duplicates when creating a new Contact/Account are "passport", "phones", "emails". If one of these fields duplicates an existing Contact/Account, the new addition will not take place. Instead, a line will be added in the History section of this Contact/Account to inform us as shown below.
"companyContact":This is the Company field, which means the contact above when added to CRM Data Platform will belong to which Company in the Data Platform data. The order of information arranged by CRM Data Platform will be as follows: "name", → "emails", → "phones"
When there is duplicate Company data, CRM will automatically add contacts to the existing Company
When there is no duplicate Company data, CRM will automatically add a new Company and import contacts
When the imported data does not contain Company field information, CRM will ignore it and only create 1 contact that does not belong to any Company..
For imported data that does not have "emails" and "phones" information, the configurations to automatically send Email or SMS to that contact will not be implemented with the configurations in Listener on the CRM interface..
If the new creation is successful, in the History section of the newly created Contact/Account, there will be a notification line as shown below
Sample data
{ "senderUser": "huy.nguyenviet@htklabs.com", "data": [ { "actionType": "add-contact", "data": { "contactType": "customer", "type": 0, "name": "Huy", "lastname": "Nguyen", "title": "This is title", "passport": "1945295865", "gender": 1, "bgInfo": "Thành viên AntBuddy", "dateOfBirth": "Fri Jan 01 1993 00:00:00 GMT+0700 (ICT)", "emails": [{"value": "huy.nguyen@htklabs.com"}], "phones": [{"value": "01234567890"}], "addresses": [{ "street": "58 Ton That Dam", "city": "Da Nang", "state": "Thanh Khe", "zip": "5100000", "country": "VN" }], "websites": [{"value": "htk-inc.com"}], "permit": { "status": 1 }, "im": [ { "protocol": "Facebook", "value": "Huy Nguyen Viet" } ] } }] } |
2.2.2. Data structure for Lead addition action
Users who want to automatically import Lead data to the CRM Data platform should POST the data according to the following format::
{ "senderUser": "youremail@here.com", //required "data": [ //required { "actionType": "add-lead", // required "data": { //required "type": 0, "name": "", //required "lastname": "", "title": "", "passport": "", "gender": [0, 1, 2] // 0: male; 1: female; 2: other "bgInfo": <Background information>, //String "dateOfBirth": "", "emails": [{ type: <email_type>, value: <email>},... ], "phones": [{ type: <phones_type>, value: <phone_number>},... ], "addresses": [{ type:<type>, street: <street>, city:<city>, state: <state>, zip:<zip>, country:{ code:<country_code>, name:<country_name>} }], "websites": [], "im": [], "permit": { "status": <status_of_permit>, "group": <group_name>, "users": [<email_of_user>] }, "tag": "", //String "contactId": <idcontact> //String "cusFields": [{ "name": <custom field name>, "value": <value> }], "companyLead":"" // remove it if empty } }] }
|
Parameters discription
Note: The parameters of Lead are similar to Contact
Parameters | Type | Required | Description |
actionType | String | Y | Action type is "add-lead" |
type | String | N | Default "type": 0, |
companyLead | String | N | Account that Lead belongs to, if there is no information in this information field, delete it
|
Sample data sample reference
{ "senderUser": "huy.nguyenviet@htklabs.com", "data": [ { "actionType": "add-lead", "data": { "type": 0, "name": "Huy", "lastname": "Nguyen", "title": "This is title", "passport": "1945295865", "gender": 1, "bgInfo": "Thành viên AntBuddy", "dateOfBirth": "Fri Jan 01 1993 00:00:00 GMT+0700 (ICT)", "emails": [ { "value": "huy.nguyen@htklabs.com" } ], "phones": [ { "value": "01234567890" } ], "addresses": [ { "street": "58 Ton That Dam", "city": "Da Nang", "state": "Thanh Khe", "zip": "5100000", "country": "VN" } ], "permit": { "status": 1 }, "websites": [ { "value": "htk-inc.com" } ], "im": [ { "protocol": "Facebook", "value": "Huy Nguyen Viet" } ], "tag": "webhook", "contactId": "1234567897", "cusFields": [ { "name": "Referred By", "value": "Cong Nguyen" } ], "companyLead": "GOOGLE" } } ] } |
2.2.3. Data structure for updating Lead action
Updating Lead information is similar to the format structure of adding a new Lead, by changing the action as follows: "actionType": "update-lead"
The full structural format is as follows:
{ senderUser: <email> //required data: [ //required { "actionType": "update-lead", // required "data": { //required "type": 0, "name": "", "lastname": "", "title": "", "passport": "", "gender": [0, 1, 2] // 0: male; 1: female; 2: other, "bgInfo": <Background information>, //String "dateOfBirth": "", "emails": [{value: <email>}], "phones": [{value: <email>}], "addresses": [], "websites": [], "permit": { "status": <status_of_permit>, "group": <group_name>, "users": [<email_of_user>] }, "im": [], "tag": "", //String "contactId": <idcontact>, //String "customerId": <code>, //String, exist in CRM "cusFields": [ { "name": <custom field name>, "value": <custom field value> }], "companyLead": "", // remove it if empty } }] } |
Reference data sample:
{ "senderUser": "huy.nguyenviet@htklabs.com", "data": [ { "actionType": "update-lead", "data": { "type": 0, "name": "Huy", "lastname": "Nguyen Viet", "title": "This is title", "passport": "1945295865", "gender": 1, "bgInfo": "Thành viên của AntBuddy", "dateOfBirth": "Fri Jan 02 1993 00:00:00 GMT+0700 (ICT)", "emails": [ { "value": "huy.nguyen@htklabs.com" } ], "phones": [ { "value": "01234567890" } ], "addresses": [ { "street": "58 Ton That Dam", "city": "Da Nang", "state": "Thanh Khe", "zip": "5100000", "country": "VN" } ], "websites": [ { "value": "htk-inc.com" } ], "im": [ { "protocol": "Facebook", "value": "Huy Nguyen Viet" } ], "tag": "webhook", "permit": { "status": 2 }, "contactId": "1234567897", "customerId": "LID-123" "cusFields": [ { "name": "Referred By", "value": "Cong Nguyen" } ], "companyLead": "GOOGLE" } } ] } |
2.2.4. Data structure for updating Contact/Account action
The data structure for the action of updating a contact to CRM Data Platform will be similar to the structure of the action of creating a new one. Only the "actionType" field is changed, in this part the user needs to convert the action type to "actionType": "update-contact"
Below is the full structure of updating contacts to CRM Data Platform
{ senderUser: <email> //required data: [ //required { "actionType": "update-contact", // required "data": { //required "name": "", "lastname": "", "type": 0 //if want to update account then change 0 to 1 "title": "", "passport": "", "gender": [0, 1, 2] // 0: male; 1: female; 2: other "bgInfo": <Background information>, //String "dateOfBirth": "", "emails": [{value: <email>}], "phones": [{value: <email>}], "addresses": [], "websites": [], "permit": { "status": <status_of_permit>, "group": <group_name>, "users": [<email_of_user>] }, "im": [], "tag": "", //String "customerId": <code> //String, exists in CRM "cusFields": [{ "name": <custom field name>, "value": <custom field value> }], "companyContact": { // remove it if empty or want to add new account "customerId": <code>, //String "emails": [{value: <email>}], "phones": [{value: <email>}], "name": "" , "websites": [ { "value": "" }], "addresses": [], "im": [], } } }] } |
Note:
It is required to have one of the following information fields: "contactId", "passport", "emails", "phones", "customerId".
The order of information arranged by CRM Data Platform will be as follows: 1. "customerId", → 2. "contactId", → 3. "name", → 4. "emails", → 5. "Phones"
"companyContact":This is the Company field, which means the contact above when added to CRM Data Platform will belong to which Company in the Data Platform data. This information is searched before adding a contact to that Company.
Reference sample data
{ "senderUser": "huy.nguyenviet@htklabs.com", "data": [ { "actionType": "update-contact", "data": { "name": "Huy", "lastname": "Nguyen Viet", "title": "This is title", "passport": "1945295865", "gender": 1, "bgInfo": "Thành viên AntBuddy", "dateOfBirth": "Fri Jan 02 1993 00:00:00 GMT+0700 (ICT)", "emails": [{"value": "huy.nguyen@htklabs.com"}], "phones": [{"value": "01234567890"}], "addresses": [{ "street": "58 Ton That Dam", "city": "Da Nang", "state": "Thanh Khe", "zip": "5100000", "country": "VN" }], "websites": [{"value": "htk-inc.com"}], "im": [ { "protocol": "Facebook", "value": "Huy Nguyen Viet" } ], "tag": "webhook", "permit: { "status": 3, "group": "Nhom test" }, "customerId": "PID-678", "cusFields": [{ "name": "Referred By", "value": "Cong Nguyen" }], "companyContact": { "customerId": "CID-123", "emails": [{"value": "dong.nguyen@htklabs.com"}], "phones": [{"value": "01234567833"}], "addresses": [{ "street": "58 Ton That Dam", "city": "Da Nang", "state": "Thanh Khe", "zip": "5100000", "country": "VN", }], "websites": [{"value": "htk-inc.com"}], "name": "GOOGLE" } } } ] } |
2.2.5. Data structure for Note addition action
This is the action for adding a Note to a contact or order. This type of action is "actionType": "add-note".
Below is the structure for Note adding action:
{ "senderUser": <email>, //required "data": [{ "actionType": "add-note", //required "data": { "body": "", //required "email": "<contact email>", "phone": "<contact phone number>", "passport": "<contact passport>", "name": <name deal>, "customerId": <LID hoặc PID>, "dealId": <id-Deal>, "permit": { "status": <status_of_permit>, "group": <group_name>, "users": [<email_of_user>] }, "tag": "webhook", //if model is contact, "channel": "Kite Chat", // channel ticket "model": "contact" or "deal" // optional, default is ‘contact’, support contact, deal only for now } }] } |
Parameters description
Parameters | Data type | Required | Explanation |
body | String | Y | The content of note |
dealId | String | N | ID of an order |
contactId | String | N | ID of a contact |
model | String | N | - Default "contact" - There are 2 type "model: |
channel | String | N | Configured channel in Channel settings The customer on the CRM |
permit | Object | N | Sharing permission of note |
customerId | String | N | - Customer code. - If you want to add a note to a Contact, it will be the PID. Ex: "customerId":"PID-124" - If you want to add a note to a Lead, this field must accompany the field "contactType": "lead". Ex: "customerId":"LID-112", "contactType":"lead" |
Note:
If a user wants to add a Note to an order, replace the "model" field as follows
To add a Note to an order, it is required that the information entered must contain one of the following fields "dealId", "name". And arrange the following information in order "dealId", → "name".
If the user wants to add a Note to a contact, replace the field "model": as follows
To add a note to a contact, the information entered must contain information from one of the following fields: "customerId", "passport", "emails", "phones". And priority is arranged in the following order: "customerId", → "passport", → "email", → "phone".
Reference sample data
{ "senderUser": "huy.nguyenviet@htklabs.com", "data": [{ "actionType": "add-note", "data": { "body": "This is body of Note", "email": "huy.nguyen@htklabs.com", "phone": "0123456789", "passport": "0123469988", "customerId": "LID-345", "contactType": "lead", //remove or replace "lead" to "customer" if want to add note for Contact "model": "contact", "tag": "webhook", "permit": { "status": 4, "users": ["huy.nguyen@htklabs.com","luyt.ngo@htklabs.com"] } } }] } |
{ "senderUser": "huy.nguyenviet@htklabs.com", "data": [{ "actionType": "add-note", "data": { "body": "This is body of Note", "name": "Booking-ID1135", "dealId": "11358", "model": "deal", } }] } |
2.2.6. Data structure for adding and updating Orders
The data structure to add or update an order is the same.
{ "senderUser": "viethuy110@gmail.com", "data": [{ "actionType": "add-deal", "data": { "dealId": "1234567890", //id deal. "name": "Booking-ID #0003", "value": 50000, "currency": "VND", "description": "This is desciption", "stage": "", //name stage in org CRM . "closeDate": 1482470382793, //time stamp "category": "UI Design", //name category in org CRM "package": "Goi A", //name package in org CRM "owner_opportunity": { // Owner opportunity "users": ["nhanvien1@beeiq.co","nhanvien2@beeiq.co"], //Emails of users in org CRM "groups": ["Nhom 1","Nhom 2"] //Array of group name in org CRM }, "dealWith": { "type": 0, "name": "Nguyen viet huy", "lastname": "", "title": "", "customerId": "LID-123", "contactType": "lead", //remove or replace "lead" to "customer" if want to add note for Contact/Account "passport": "", "gender": "", "dateOfBirth": "", "emails": [{"value": "huy@gmail.com"}], "phones": [{"value": "0987654321"}], "addresses": [{"street":"street", "city": "city", "country": "country" }], "websites": [], "im": [], "tag": "" //string }, "contacts":[{ // array objects contact follow data of action add-contact "type": 0, "name": "Quoc Phong", "lastname": "", "title": "", "customerId": "LID-123", "contactType": "lead", //remove or replace "lead" to "customer" if want to add note for Contact/Account "passport": "", "gender": "", "dateOfBirth": "", "emails": [{"value": "phong@gmail.com"}], "phones": [], "addresses": [], "websites": [], "im": [] }], "permit": { "status": 4, "users": ["huy.nguyen@htklabs.com","luyt.ngo@htklabs.com"] }, "cusFields": [{ "name": <custom field name>, "value": <custom field value> }], } }] }
|
Parameters description
Parameters | Data type | Required | Explanation |
dealId | String | N | - Is the code of an order that is already in CRM => "dealId": 192 -If the dealId is found, the order will be updated, otherwise a new order will be added |
name | String | Y | - Is order name field - If a deal with the same name is found, the order will be updated; if not, a new order will be added Note: - In case there is a dealId transmission, it will rely on dealId to search for orders, but if there is no dealId, it will rely on the name. |
value | String | N | Is the Value field of the order |
currency | String | N | Is a currency that belongs to the list of available currencies in CRM |
description | String | N | Is the order Description field |
stage | String | N | - Is the Status field in the order configured in CRM - When an order is created, this field is required |
owner_opportunity | Object Array | N | - Is the order manager field in the transaction. - The list of people participating in managing that transaction includes:: + User list: is an array of email lists of users in the CRM org. The field used is users + Group List: is an array of names of groups present in org CRM. The used field is groups Ví dụ: "owner_opportunity": { "users": ["nhanvien1@beeiq.co","nhanvien2@beeiq.co"], "groups": ["Nhom A","Nhom B"] } |
package | String | N | Is the Package field of the order configured in CRM |
category | String | N | Is the Category field of the order configured in CRM |
closeDate | Number |
| Is the End Date field in the order |
dealWith | Object | N | - Is the Customer field in a order on CRM Data Platform - When an order is created, this field is required - If the customer is not found in the system, CRM will create a new customer with the entered information |
Parameters | Required | Data type | Explanation | passport | Y | String | - Customer passport number | phones | Y | Array Object | - The structure is similar to the Contact/Account addition section | emails | Y | Array Object | - The structure is similar to the Contact/Account addition section | name | N | String | - Customer name. If you want to create a new Customer, you need to enter a name | lastname | N | String | - Customer last name | addresses | N | Array Object | - The structure is similar to the Contact/Account addition section | cusFields | N | Array Object | - The structure is similar to the Contact/Account addition section | dateOfBirth | N | Date | - The structure is similar to the Contact/Account addition section | tag | N | String | | permit | N | Object | - The structure is similar to the Contact/Account addition section | contactType | N | String | - Used to distinguish customer types in CRM - There are 2 types: + "contactType": "lead" refers to the object that is Lead + "contactType": "customer" refers to the object that are Contact and Account - Default parameter is customer | type | N | Number | - Used to distinguish customer types in CRM - There are 2 types: + "type": 0 refers to the object that are Lead and Contact + "type": 1 refers to the object that is Account - Default parameter is 0 | customerId | N | String | - Is customer code on CRM . - If you want to add a deal to a Contact, it will be the PID. Ex: "customerId":"PID-124" - If you want to add a deal to a Lead, this field must be accompanied with the "contactType" field: "lead". Ex: "customerId":"LID-112", "contactType":"lead" | companyContact |
Parameters | Required | Data type | Explanation | customerId | Y | String | - Is customer code on CRM . - If you want to add a deal to a Contact, it will be the PID. Ex: "customerId":"PID-124" - If you want to add a deal to a Lead, this field must be accompanied with the "contactType" field: "lead". Ex: "customerId":"LID-112", "contactType":"lead" | emails | Y | Array Object | - The structure is similar to the Contact/Account addition section | phones | Y | Array Object | - The structure is similar to the Contact/Account addition section | websites | Y | Array Object | - The structure is similar to the Contact/Account addition section | name | N | String | - Customer name | addresses | N | Array Object | - The structure is similar to the Contact/Account addition section | permit | N | Object | - The structure is similar to the Contact/Account addition section |
|
|
permit | Object | N | - The structure is similar to the permit section in add/update Contact/Account |
contacts | Array Object | N | - Is related customer of the order on CRM Data Platform - If the customer is not found in the system, CRM will create a new customer with the entered information - The structure is similar to the dealWith |
cusFields | Object | N | - The structure is similar to the Contact/Account section but uses the Deal custom field |
2.2.7. Data structure for Ticket addition action
Data structure for adding a new Ticket on the CRM Data Platform system:
{ "senderUser": <email>, //required "data": [{ "actionType": "add-ticket", // required "data": { "contactType": "lead", //lead:Lead - customer: Contact "title": "" "body": "", //required "email": "<contact email>", "phone": "<contact phone number>", "passport": "<contact passport>", "name": <name contact>, "contactId": <id-contact>, "customerId": <code_customer> "dealId": <id-Deal>, "tag": "webhook", "groupName": "", "slaName": "", "channel": "Kite Chat", // channel ticket "cusFields": [{ "name": <custom field name>, "value": <value> }] }] } |
Mô tả tham số
Tham số | Kiểu dữ liệu | Bắt buộc | Giải thích |
contactType | String | Y | - Có 2 loại contact: lead, customer - Mặc định "contactType": "customer", |
body | String | Y | - Trường thông tin Mô tả của Ticket - Bắt buộc phải có |
groupName | String | N | - Nhóm người dùng được cấu hình trên CRM |
slaName | String | N | - Trường thông tin SLA được cấu hình ở phần cài đặt Ticket (SLA) |
channel | String | N | - Có 9 Kênh: Email, Phone, Web Contact Form, Kite Call, Kite Chat, Kite Viber, Kite Facebook, Kite Skype |
Reference sample data
{ "senderUser": "huy.nguyenviet@htklabs.com", "data": [{ "actionType": "add-ticket", "data": { "contactType": "lead", //remove or replace "lead" to "customer" if want to add ticket for Contact/Account "title": "title", "body": "This is body of Ticket", "email": "huy.nguyen@htklabs.com", "phone": "0123456789", "passport": "0123469988", "contactId": "1234567897", "customerId": "LID-123", "groupName": "Phong Kinh Doanh", "slaName": "custom", "channel": "Contact Form", "tag": "webhook" } }] } |
2.2.8. Data structure for sending sms action
Data structure for sending SMS action on the CRM Data Platform system:
{ "senderUser": <email>, //required "data": [{ "actionType": "send-sms", // required "data": { "content": "", //required "phones": [“list phones”] //required } }] } |
Parameters description
Parameter | Data type | Required | Explanation |
content | String | Y | sms content |
phones | Array | Y | List of phone numbers to send sms |
Note:
This feature only applies to accounts that have registered an SMS sending account with an SMS provider and have set up an SMS sending account on the CRM.
Accounts that do not set up SMS will no longer be able to send after the system's trial SMSs expire.
Reference sample data
{ "senderUser": "huy.nguyenviet@htklabs.com", "data": [{ "actionType": "send-sms", "data": { "content": "This is content", "phones": [“0333456789”,”098765431”] } }] } |