Import customer
Import customer
Single user import customer
Not in maintenance
- URI
/wscrm-bus-api/customer/api/import
- Request method
PUT , Content-Type : application/json
- Request params
Attribute | Type | Required | Description |
---|---|---|---|
tenantId | Long | yes | tenant id . Get the way to contact your administrator |
userName | String | yes | user name |
data | List | yes | import customer data |
token | String | yes | |
createTime | String | yes | request time (yyyy-MM-dd HH:mm:ss) |
- data:
Attribute | Type | Required | Description |
---|---|---|---|
String | yes | ||
friendName | String | no | name |
sex | String | Background settings | gender: Unknown, male, female |
birthday | String | Background settings | birthday:2020/03/08 (Currently only this format is supported) |
address | String | Background settings | address |
String | Background settings | ||
profession | String | Background settings | profession |
income | String | Background settings | income |
desc | String | Background settings | Description |
tabName | stirng | Background settings | tab names : tab1,tab2 |
stage | String | Background settings | customer stage: Background settings |
source | String | Background settings | customer source: Background settings |
languageTag | String | Background settings | customer language: by Background download excel template |
welcome | String | no | welcome content |
extend fields | String | no | See the explanation below for details |
- Example:
{
"tenantId": 82,
"userName": "kubrick101",
"data": [
{
"whatsApp": "15266667779",
"friendName": "jack",
"sex": "male",
"birthday": "2020/03/08",
"address": "new york",
"email": "23@gmail.com",
"profession": "work man",
"income": "100 $",
"desc": "a good man",
"tabName": "new friend,rich man",
"stage": "NewCustomer",
"source": "System",
"hi": "hi hi",
"extendAttribute1": "exrend Attribute",
"languageTag": "Auto",
"welcome": "hello man"
},
{
"whatsApp": "15266667779",
"friendName": "role",
"sex": "female",
"birthday": "2020/03/08",
"address": "new york",
"email": "23@gmail.com",
"profession": "work man",
"income": "100 $",
"desc": "a good man",
"tabName": "new friend,rich man",
"stage": "NewCustomer",
"source": "System",
"hi": "hi hi",
"extendAttribute1": "exrend Attribute",
"languageTag": "Auto",
"welcome": "hello man"
}
],
"token": "48ac86f77f26e4719a62d3b2c569a67b",
"createTime": "2021-03-08 14:25:00"
}
- How the parameter is obtained
userName: user name is login account. Used to distinguish the put-to-agent of whatsApp
- Extend attributes
According to the backend customer setting, to pass parameters for extended Attributes, use the key as the name of the extended Attribute, and the value as the value of the extended Attribute. For example:
Text: "Hello":"Hello World"
Number: "This is a number extended Attribute":123
Date: "This is a date extended Attribute":"2022-03-08"
Time: "Time":"12:00:00"
Single Selection: "Single Selection":"Option A" Multiple Selection: "Multiple Selection":"Option A,Option B"
- Response
Correct example:
{
"code": 200,
"message": "Success",
"data": {
"successExcel": [],
"errExcel": [],
"successCount": 2,
"errCount": 0,
"notFollowSuccessCount": "",
"notFollowSuccessExcels": []
}
}
Error example:
{
"code": 200,
"message": "Success",
"data":""
}
{
"code": 200,
"message": "Success",
"data": {
"successExcel": [],
"errExcel": [
{
"errPhone": "",
"errInfo": "PHONE_ERROR",
"errCode": 28
},
],
"successCount": 0,
"errCount": 2,
"notFollowSuccessCount": "",
"notFollowSuccessExcels": []
}
}
Attribute | Type | Description |
---|---|---|
data | String | data (excel) |
msg | String | message |
code | String | response code (200、500、-1) -1 is params error |
- data
Attribute | Description |
---|---|
errExcel | import err phone number. and err detail |
errCount | err count |
Customer batch import(not import pool)
- URI
/wscrm-bus-api/customer/api/batchImport
- Request method
POST , Content-Type : application/json
- Request params
Attribute | Type | Required | Description |
---|---|---|---|
tenantId | Long | yes | tenant id |
userName | String | yes | user login account |
data | List | yes | import data |
token | String | yes | |
createTime | String | yes | request time (yyyy-MM-dd HH:mm:ss) |
- data:
Attribute | Type | Required | Description |
---|---|---|---|
agentAccount | String | yes | user login account |
String | yes | ||
friendName | String | no | name |
sex | String | Background settings | gender: unknown、male、female |
birthday | String | Background settings | birthday: 2020/03/08 |
address | String | Background settings | address |
String | Background settings | ||
profession | String | Background settings | profession |
income | String | Background settings | income |
desc | String | Background settings | Description |
tabName | string | Background settings | tab names: by , split |
stage | String | Background settings | customer stage |
source | String | Background settings | customer source |
languageTag | String | Background settings | customer language |
welcome | String | no | welcome content |
extend fields | String | no | See the explanation below for details |
- Example:
{
"tenantId": 82,
"userName": "kubrick",
"data": [
{
"whatsApp": "15266667779",
"agentAccount":"kubrick101",
"friendName": "lee",
"sex": "female",
"birthday": "2020/03/08",
"address": "new york",
"email": "23@gmail.com",
"profession": "work man",
"income": "100 $",
"desc": "a good man",
"tabName": "new friend,rich man",
"stage": "NewCustomer",
"source": "System",
"hi": "hi hi",
"extendAttribute1": "exrend Attribute",
"languageTag": "Auto",
"welcome": "hello man"
},
{
"whatsApp": "15266667779",
"agentAccount":"kubrick101",
"friendName": "rose",
"sex": "female",
"birthday": "2020/03/08",
"address": "new york",
"email": "23@gmail.com",
"profession": "work man",
"income": "100 $",
"desc": "a good man",
"tabName": "new friend,rich man",
"stage": "NewCustomer",
"source": "System",
"hi": "hi hi",
"extendAttribute1": "exrend Attribute",
"languageTag": "Auto",
"welcome": "hello man"
}
],
"token": "48ac86f77f26e4719a62d3b2c569a67b",
"createTime": "2021-03-08 14:25:00"
}
- How the parameter is obtained
userName: user name is login account. Used to distinguish the put-to-agent of whatsApp
- Extend attributes
According to the backend customer setting, to pass parameters for extended Attributes, use the key as the name of the extended Attribute, and the value as the value of the extended Attribute. For example:
Text: "Hello":"Hello World"
Number: "This is a number extended Attribute":123
Date: "This is a date extended Attribute":"2022-03-08"
Time: "Time":"12:00:00"
Single Selection: "Single Selection":"Option A" Multiple Selection: "Multiple Selection":"Option A,Option B"
- response data:
Correct example:
{
"code": 200,
"message": "Success",
"data": {
"successExcel": [],
"errExcel": [],
"successCount": 2,
"errCount": 0,
"notFollowSuccessCount": "",
"notFollowSuccessExcels": []
}
}
Error example:
{
"code": 200,
"message": "Success",
"data":""
}
{
"code": 200,
"message": "Success",
"data": {
"successExcel": [],
"errExcel": [
{
"errPhone": "",
"errInfo": "PHONE_ERROR",
"errCode": 28
},
],
"successCount": 0,
"errCount": 2,
"notFollowSuccessCount": "",
"notFollowSuccessExcels": []
}
}
Attribute | Type | Description |
---|---|---|
data | String | data (excel) |
msg | String | message |
code | String | response code |
- data
Attribute | Description |
---|---|
errExcel | import error phone number |
errCount | import error phone count |
Customer batch import(import pool)
- URI
/wscrm-bus-api/customer/api/batchImportWhatsContact
- Request method
POST , Content-Type : application/json
- Request params
Attribute | Type | Required | Description |
---|---|---|---|
tenantId | Long | yes | tenant id |
userName | String | yes | user login account |
data | List | yes | import data |
token | String | yes | |
createTime | String | yes | request time (yyyy-MM-dd HH:mm:ss) |
- data:
Attribute | Type | Required | Description |
---|---|---|---|
agentAccount | String | yes | user login account |
String | yes | ||
friendName | String | no | name |
sex | String | Background settings | gender: unknown、male、female |
birthday | String | Background settings | birthday: 2020/03/08 |
address | String | Background settings | address |
String | Background settings | ||
profession | String | Background settings | profession |
income | String | Background settings | income |
desc | String | Background settings | Description |
tabName | stirng | Background settings | tab names: by , split |
stage | String | Background settings | customer stage |
source | String | Background settings | customer source |
languageTag | String | Background settings | customer language |
welcome | String | no | welcome content |
extend fields | String | no | See the explanation below for details |
- Example:
{
"tenantId": 82,
"userName": "kubrick",
"data": [
{
"whatsApp": "15266667779",
"friendName": "lee",
"sex": "female",
"birthday": "2020/03/08",
"address": "new york",
"email": "23@gmail.com",
"profession": "work man",
"income": "100 $",
"desc": "a good man",
"tabName": "new friend,rich man",
"stage": "NewCustomer",
"source": "System",
"hi": "hi hi",
"extendAttribute1": "exrend Attribute",
"languageTag": "Auto",
"welcome": "hello man"
}
{
"whatsApp": "15266667779",
"friendName": "rose",
"sex": "female",
"birthday": "2020/03/08",
"address": "new york",
"email": "23@gmail.com",
"profession": "work man",
"income": "100 $",
"desc": "a good man",
"tabName": "new friend,rich man",
"stage": "NewCustomer",
"source": "System",
"hi": "hi hi",
"extendAttribute1": "exrend Attribute",
"languageTag": "Auto",
"welcome": "hello man"
}
],
"token": "48ac86f77f26e4719a62d3b2c569a67b",
"createTime": "2021-03-08 14:25:00"
}
- How the parameter is obtained
userName: user name is login account. Used to distinguish the put-to-agent of whatsApp
- Extend attributes
According to the backend customer setting, to pass parameters for extended Attributes, use the key as the name of the extended Attribute, and the value as the value of the extended Attribute. For example:
Text: "Hello":"Hello World"
Number: "This is a number extended Attribute":123
Date: "This is a date extended Attribute":"2022-03-08"
Time: "Time":"12:00:00"
Single Selection: "Single Selection":"Option A" Multiple Selection: "Multiple Selection":"Option A,Option B"
- Response Data
Correct example:
{
"code": 200,
"message": "Success",
"data": {
"successExcel": [],
"errExcel": [],
"successCount": 2,
"errCount": 0,
"notFollowSuccessCount": "",
"notFollowSuccessExcels": []
}
}
Error example:
{
"code": 200,
"message": "Success",
"data":""
}
{
"code": 200,
"message": "Success",
"data": {
"successExcel": [],
"errExcel": [
{
"errPhone": "",
"errInfo": "PHONE_ERROR",
"errCode": 28
},
],
"successCount": 0,
"errCount": 2,
"notFollowSuccessCount": "",
"notFollowSuccessExcels": []
}
}
Attribute | Type | Description |
---|---|---|
data | String | data (excel) |
msg | String | message |
code | String | response code |
- data
Attribute | Description |
---|---|
errExcel | import error phone number |
errCount | import error phone count |
Customer batch import (role attribute append)
- URI
/wscrm-bus-api/customer/api/batchImportAppend
- Request method
POST , Content-Type : application/json
- Request params
Attribute | Type | Required | Description |
---|---|---|---|
tenantId | Long | yes | tenant id |
userName | String | yes | user login account |
data | List | yes | import data |
token | String | yes | |
createTime | String | yes | request time (yyyy-MM-dd HH:mm:ss) |
- data:
Attribute | Type | Required | Description |
---|---|---|---|
agentAccount | String | yes | user login account |
String | yes | ||
friendName | String | no | name |
sex | String | Background settings | gender: unknown、male、female |
birthday | String | Background settings | birthday: 2020/03/08 |
address | String | Background settings | address |
String | Background settings | ||
profession | String | Background settings | profession |
income | String | Background settings | income |
desc | String | Background settings | Description |
tabName | stirng | Background settings | tab names: by , split |
stage | String | Background settings | customer stage |
source | String | Background settings | customer source |
languageTag | String | Background settings | customer language |
welcome | String | no | welcome content |
extend fields | String | no | See the explanation below for details |
Example:
{
"tenantId": 82,
"userName": "kubrick",
"data": [
{
"whatsApp": "15266667779",
"friendName": "lee",
"sex": "female",
"birthday": "2020/03/08",
"address": "new york",
"email": "23@gmail.com",
"profession": "work man",
"income": "100 $",
"desc": "a good man",
"tabName": "new friend,rich man",
"stage": "NewCustomer",
"source": "System",
"hi": "hi hi",
"extendAttribute1": "exrend Attribute",
"languageTag": "Auto",
"welcome": "hello man"
}
{
"whatsApp": "15266667779",
"friendName": "rose",
"sex": "female",
"birthday": "2020/03/08",
"address": "new york",
"email": "23@gmail.com",
"profession": "work man",
"income": "100 $",
"desc": "a good man",
"tabName": "new friend,rich man",
"stage": "NewCustomer",
"source": "System",
"hi": "hi hi",
"extendAttribute1": "exrend Attribute",
"languageTag": "Auto",
"welcome": "hello man"
}
],
"token": "48ac86f77f26e4719a62d3b2c569a67b",
"createTime": "2021-03-08 14:25:00"
}
- How the parameter is obtained
userName: user name is login account. Used to distinguish the put-to-agent of whatsApp
- extend Attributes
According to the backend customer setting, to pass parameters for extended Attributes, use the key as the name of the extended Attribute, and the value as the value of the extended Attribute. For example:
Text: "Hello":"Hello World"
Number: "This is a number extended Attribute":123
Date: "This is a date extended Attribute":"2022-03-08"
Time: "Time":"12:00:00"
Single Selection: "Single Selection":"Option A" Multiple Selection: "Multiple Selection":"Option A,Option B"
- Rsponse data
Correct example:
{
"code": 200,
"message": "Success",
"data": {
"successExcel": [],
"errExcel": [],
"successCount": 2,
"errCount": 0,
"notFollowSuccessCount": "",
"notFollowSuccessExcels": []
}
}
Error example:
{
"code": 200,
"message": "Success",
"data":""
}
{
"code": 200,
"message": "Success",
"data": {
"successExcel": [],
"errExcel": [
{
"errPhone": "",
"errInfo": "PHONE_ERROR",
"errCode": 28
},
],
"successCount": 0,
"errCount": 2,
"notFollowSuccessCount": "",
"notFollowSuccessExcels": []
}
}
Attribute | Type | Description |
---|---|---|
data | String | data (excel) |
msg | String | message |
code | String | response code |
- data
Attribute | Description |
---|---|
errExcel | import error phone number |
errCount | import error phone count |
- Error code
Code | Description |
---|---|
-1 | token error / TenantId Is Null / Admin Cannot import data / Data Is Null |
10 | sex Attribute error |
14 | source error |
15 | stage error |
16 | languageTag error |
19 | The quantity exceeds the limit |
21 | extend fields The content exceeds the specified length |
22 | Required Attribute Not filled in |
23 | extend fields - number Type error |
24 | extend fields - date Type error / birthday Attribute Type yyyy/MM/dd |
25 | extend fields - time Type error HH:mm:ss |
26 | extend fields -Radio Type error |
27 | extend fields -Multiple selection Type error |
28 | phone error |
29 | phone is empty |
51 | country Attribute is empty |
56 | friendWhatsId Processing(One-minute interval) |
58 | extend fields - file Type url The number of tickets exceeds 10 |
59 | extend fields - The attachment has an invalid address or network fluctuations or a large file |
60 | extend fields - The attachment Type file is too large |