Create Field Work Plan
# Description
Create a field work plan.
# Request Specification
Method: POST + application/json
Endpoint: https://${Cloud Domain}/cgi/seniorOutsideAttendance/createPlan?thirdTraceId=${Random String}
Headers: Refer to Common Parameters
# Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| data | Map | Yes | Dataset |
| planTime | Long | No | Planned execution time (timestamp in milliseconds) |
| checkTypeId | String | No | Field work type ID |
| executorId | String | No | OpenUserId of the plan executor |
| assistantIds | List | No | List of OpenUserIds for assistants |
| extFields | Map | No | Custom fields configuration for field work plans (refer to Advanced Field Work for field descriptions) |
| mainObject | Map | No | Main object data |
| apiName | String | No | API name of the associated main object |
| dataId | String | No | ID of the associated main object |
| info | String | No | Customer's latitude and longitude coordinates |
| referenceObject | List | No | Reference object data |
# Request Example
{
"data": {
"extFields": {
"field_wtdjl__c": [
"FSUID_2A5C47312075A11F9156B94FC66C0E7A"
],
"field_Xtlzv__c": [
{
"path": "b2b09ea0-893b-4ca6-9275-e95a482a5c75"
}
],
"field_P816C__c": "5e17e1c2bd00210001ffebb4",
"field_B6U86__c": "option1",
"field_01RyR__c": "Test Hahaha"
},
"referenceObject": [
{
"apiName": "ContactObj",
"dataId": "5e0239ef10b549000180f30a"
}
],
"executorId": "{openUserId}",
"assistantIds": [
"FSUID_2B2FAD127CFACB0A45CFF551BCE8A4CF"
],
"planTime": 1581519600000,
"checkTypeId": "5e3c1e5e827f1700013272fb",
"mainObject": {
"apiName": "AccountObj",
"dataId": "116.332363#%$39.976518#%$Satellite Building",
"info": "5d4414d7e63cd100010efc9d"
}
}
}
# Response Parameters
| Parameter | Type | Description |
|---|---|---|
| traceId | string | Unique request identifier |
| errorDescription | string | Error description |
| errorMessage | string | Error message |
| errorCode | Int | Error codes reference |
| checkinId | string | Field work plan ID |
# Response Example
{
"traceId": "E-O.827xxxxxx",
"errorDescription": "success",
"errorMessage": "OK",
"errorCode": 0,
"checkinId":"123456"
}
# Notes
- Do not use the response's
messagefield for logical judgments aserrorMessagemay vary. - The
planTimeparameter expects a Unix timestamp in milliseconds. - All custom field names (e.g., field_wtdjl__c) should remain unchanged as they are system identifiers.