Customer Relationship
Customer Relationship
Batch Clear Customer Owner
Description
Batch clear customer owners.
URI
/wscrm-bus-api/open/customer/setPrincipalAsNull
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| tenantId | Long | Yes | Company id |
| userName | String | Yes | Admin account |
| data | List | Yes | Format [111,222], details below (0–50 items) |
data Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| String | Yes | Friend whatsapp |
Request example:
{
"tenantId": 1223,
"userName": "yangkun",
"data": [919161506154]
}Response Parameter Description
Parameter Name Type Required Example Remarks code int Yes 200 Status code message String No 成功 Description data String No [] Data data Parameter Description
Parameter Name Type Required Example Remarks isAllOk Boolean Yes Whether all updated successfully total int Yes Total whatsIdcountsuccessWhatsIds List Yes Successful whatsIdfailWhatsIds List Yes Failed whatsIdResponse example
{
"code": 200,
"message": "Success",
"data": {
"isAllOk": true,
"total": 1,
"successWhatsIds": ["919161506154"],
"failWhatsIds": []
}
}Delete Customers
Description
Delete customers.
The time required to delete all customers depends on the data volume; the more data to delete, the longer it takes.
During deletion, if there are data operations, it may cause data loss. Please use with caution.
URI
/wscrm-bus-api/open/customer/del
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| tenantId | Long | Yes | Company id |
| userName | String | Yes | Admin account |
| token | String | Yes | token |
| createTime | String | Yes | Creation time |
| type | int | Yes | Data type to delete: 1 all, 2 agents, 3 customers |
| item | array | Depends on type | When type is 1, this value can be empty. When type is 2, item contains the agent account(s) to be deleted. When type is 3, item contains the whatsapp numbers to be deleted. |
Request example:
{
"tenantId": 1223,
"userName": "yangkun",
"token": "417a22f7713bdaca425a23e7958b51b7",
"createTime": "2023-01-11 13:48:33",
"type": 1,
"item": ["moppo00001"]
}Response Parameter Description
Parameter Name Type Required Example Remarks code int Yes 200 Status code message String No 成功 Description data String No [] Data Response example
{
"code": 200,
"message": "Success",
"data": ""
}Delete Friend Contact
Description
Delete friend contact.
URI
/wscrm-bus-api/open/customer/delFriendsContacts
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| tenantId | Long | Yes | Company id |
| userName | String | Yes | Admin account |
| info | Object | Yes | Request condition parameters |
info Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| friendWhatsId | String | Yes | Friend whatsapp |
| whatsId | String | No | Customer service account |
| agentAccount | String | No | Agent account |
Request example:
{
"info": {
"friendWhatsId": "8801833524358",
"whatsId": "",
"agentAccount": ""
},
"tenantId": 520274,
"userName": "testlsl001"
}Response Parameter Description
Parameter Name Type Required Example Remarks code int Yes 200 Status code message String No 成功 Description data String No Data Response example
{
"code": 200,
"message": "Success ",
"data": ""
}Query Deleted Friend Contact Records
Description
Query records of deleted friend contacts.
URI
/wscrm-bus-api/open/customer/queryDelCustomerInfo
Request Method
POST、Content-Type: application/json
Request Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| tenantId | Long | Yes | Company id |
| info | Object | Yes | Condition parameters |
| current | Integer | Yes | Current page |
| pageSize | Integer | Yes | Page size |
info Parameter Description
| Parameter Name | Type | Required | Remarks |
|---|---|---|---|
| friendWhatsId | String | No | Friend whatsapp |
| whatsId | String | No | Customer service account |
| agentAccount | String | No | Agent account |
| delFlag | Integer | No | Delete flag: 0 not deleted, 1 deleted |
Request example:
{
"info": {
"friendWhatsId": "8801833524358",
"whatsId": "",
"agentAccount": "",
"delFlag": 1
},
"tenantId": 520274,
"current": 1,
"pageSize": 2
}Response Parameter Description
Parameter Name Type Required Example Remarks code int Yes 200 Status code message String No 成功 Description data String No Object Data total Integer No 1 Total count
data Parameter Description
Parameter Name Type Required Remarks records list Yes records records Parameter Description
Parameter Name Type Required Remarks whatsId String Yes whatsId friendWhatsId String Yes friendWhatsId delFlag Integer No Delete flag: 0 not deleted, 1 deleted deleteTime String No Delete time
- Response example
{
"code": 200,
"message": "Success ",
"data": {
"records": [
{
"whatsId": "67074807576",
"friendWhatsId": "8801833524358",
"delFlag": 1,
"deleteTime": "2025-04-02 21:01:28"
}
],
"total": 1
}
}