* Marketing automation mass messaging
About 2 min
* Marketing automation mass messaging
Add group send Task api
Description
group send Api
URI
/wscrm-bus-api/open/mark/batchAdd
Request method
POST、Content-Type: application/json
Request params
Attribute | Type | Required | Description |
---|---|---|---|
tenantId | Long | yes | tenant id |
userName | String | yes | user name (login account) |
data | List | yes | data |
token | String | yes | |
createTime | String | yes | request time (yyyy-MM-dd HH:mm:ss) |
data:
Attribute | Type | Required | Description |
---|---|---|---|
name | String | yes | name |
executorList | List | yes | Executor |
reachedNum | Integer | no | quantity |
customerGroupKey | Integer | yes | customer group Type :0 csutomer statge 1、customer tab 2、customer group |
customerGroupValue | String | yes | customer group、tab name、customer whatsapp |
customerGroupValueId | String | yes | stage or tab id |
startTime | String | no | start time(yyyy-mm-dd) |
contentType | Integer | yes | 1、normal content 2、pic 3、video 、4、other |
content | String | yes | send content |
type | Integer | yes | Type 1、real time 2、 timing(by startTime) |
fileName | String | no | file name |
fileUrl | String | no | file url |
sendTimeMin | Integer | yes | Send the minimum interval(s) |
sendTimeMax | Integer | yes | The maximum interval time for sending(s) |
Example request:
{
"tenantId": 82,
"userName": "kubrick",
"token": "48ac86f77f26e4719a62d3b2c569a67b",
"createTime": "2021-03-08 14:25:00",
"data": [
{
"name": "open-Api-task-01",
"executor": "[lsl001]",
"reachedNum": 10,
"customerGroupKey": 0,
"customerGroupValue": "need",
"contentType": 1,
"content": "open-Api-test",
"type": 1,
"startTime": "",
"fileName": "",
"fileUrl": "",
"sendTimeMin": 1,
"sendTimeMax": 10
},
{
"name": "open-Api-task-02",
"executor": "[lsl001]",
"reachedNum": 10,
"customerGroupKey": 2,
"customerGroupValue": "2348134513901_auto_group",
"contentType": 1,
"content": "open-Api-test",
"type": 1,
"startTime": "",
"fileName": "",
"fileUrl": "",
"sendTimeMin": 1,
"sendTimeMax": 10
}
]
}
Response
Attribute Type Required Description code int yes code message String no Description data String no data data:
Attribute Type Required Description tenantId Integer yes tenant id taskList List yes tase name and task id
Example request:
{
"code": 200,
"message": "Success",
"data": {
"tenantId": 520274,
"taskList": [
{
"taskId": 6275,
"name": "open-Api-task-01"
},
{
"taskId": 6276,
"name": "open-Api-task-02"
}
]
}
}
After the task is executed, the URL interface configured by the callback will be executed, indicating that the task has been executed.
Callback api
The callback request requires adding ma Type to the webhook configuration information to make a callback
- Request params
Attribute | Type | Required | Description |
---|---|---|---|
tenantId | Long | yes | tenant id |
callBackUrl | String | yes | select execute task detail api |
userName | String | yes | user name (login account) |
data | List | yes | data |
token | String | yes | token |
createTime | String | yes | request time (yyyy-MM-dd HH:mm:ss) |
Example request:
{
"tenantId": 520274,
"userName": "lsl001",
"createTime": "2022-11-15 20:50:17",
"token": "a0ca798be85c3200e9f73ed7e5c952c1",
"callBackUrl": "192.168.2.23:10003/wscrm-bus-api/open/mark/record",
"data": [
{
"taskId": 6275,
"name": "open-Api-task-01"
},
{
"taskId": 6276,
"name": "open-Api-task-02"
}
]
}
Select execute task detail api
URI
/wscrm-bus-api/open/mark/record
Request method
POST、Content-Type: application/json
Request params
Attribute | Type | Required | Description |
---|---|---|---|
tenantId | Integer | yes | tenant id |
createTime | String | yes | request time (yyyy-MM-dd HH:mm:ss) |
userName | String | yes | user name (login account) |
token | String | yes | token |
data | List | yes | data |
- Example:
{
"tenantId": 500975,
"createTime": "2022-11-15 20:50:17",
"token": "cb2809b756cb2b2c47dd22581e832e0a0a204299787499ef405ebfa908382fbc",
"userName":"zz",
"data":[
{
"taskId": 1,
"name": "Ma task - A"
},
{
"taskId": 2,
"name": "Ma task - B"
}
]
}
}
- Response
Attribute | Type | Required | Description |
---|---|---|---|
taskId | Integer | yes | task id |
name | String | yes | task |
status | Integer | yes | task status 0 Executed 1 Not executed |
data | List | yes | task send detail |
data:
Attribute | Type | Required | Description |
---|---|---|---|
friendWhatsId | String | yes | ma object |
executor | String | yes | executor |
whatsId | String | yes | |
status | Integer | yes | execute status 0 Executed 1 Not executed 2 deleted |
isStrangerType | Integer | yes | relationship Type 0 friend 1 stranger |
Example:
{
"code": 200,
"message": "Success",
"data": [
{
"taskId": 6279,
"name": "open-Api-task-01",
"status": 0,
"taskRecordList": [
{
"executor": "testlsl001",
"friendWhatsId": "436602094064@c.us",
"whatsId": "33766604583@c.us",
"status": 1,
"isStrangerType": 1
},
{
"executor": "testlsl001",
"friendWhatsId": "436602090410@c.us",
"whatsId": "33766604583@c.us",
"status": 1,
"isStrangerType": 1
}
]
},
{
"taskId": 6279,
"name": "open-Api-task-02",
"status": 0,
"taskRecordList": [
{
"executor": "testlsl001",
"friendWhatsId": "436602094064@c.us",
"whatsId": "33766604583@c.us",
"status": 1,
"isStrangerType": 1
},
{
"executor": "testlsl001",
"friendWhatsId": "436602090410@c.us",
"whatsId": "33766604583@c.us",
"status": 1,
"isStrangerType": 1
}
]
}
]
}