Skip to main content

* 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

AttributeTypeRequiredDescription
tenantIdLongyestenant id
userNameStringyesuser name (login account)
dataListyesdata
tokenStringyes
createTimeStringyesrequest time (yyyy-MM-dd HH:mm:ss)

data:

AttributeTypeRequiredDescription
nameStringyesname
executorListListyesExecutor
reachedNumIntegernoquantity
customerGroupKeyIntegeryescustomer group Type :0 csutomer statge 1、customer tab 2、customer group
customerGroupValueStringyescustomer group、tab name、customer whatsapp
customerGroupValueIdStringyesstage or tab id
startTimeStringnostart time(yyyy-mm-dd)
contentTypeIntegeryes1、normal content 2、pic 3、video 、4、other
contentStringyessend content
typeIntegeryesType 1、real time 2、 timing(by startTime)
fileNameStringnofile name
fileUrlStringnofile url
sendTimeMinIntegeryesSend the minimum interval(s)
sendTimeMaxIntegeryesThe 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

    AttributeTypeRequiredDescription
    codeintyescode
    messageStringnoDescription
    dataStringnodata

    data:

    AttributeTypeRequiredDescription
    tenantIdIntegeryestenant id
    taskListListyestase 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
AttributeTypeRequiredDescription
tenantIdLongyestenant id
callBackUrlStringyesselect execute task detail api
userNameStringyesuser name (login account)
dataListyesdata
tokenStringyestoken
createTimeStringyesrequest 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

AttributeTypeRequiredDescription
tenantIdIntegeryestenant id
createTimeStringyesrequest time (yyyy-MM-dd HH:mm:ss)
userNameStringyesuser name (login account)
tokenStringyestoken
dataListyesdata
  • 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
AttributeTypeRequiredDescription
taskIdIntegeryestask id
nameStringyestask
statusIntegeryestask status 0 Executed 1 Not executed
dataListyestask send detail

data:

AttributeTypeRequiredDescription
friendWhatsIdStringyesma object
executorStringyesexecutor
whatsIdStringyeswhatsapp
statusIntegeryesexecute status 0 Executed 1 Not executed 2 deleted
isStrangerTypeIntegeryesrelationship 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
        }
      ]
    }
  ]
}
Last update:
Contributors: zhangzhuangzhuang