---
updatedAt: 2026-06-26T22:15:47.000Z
agentTools:
  projectIndex: https://docs.onfleet.com/llms.txt
---

# Creating Tasks with Custom Task Templates

This is an Enterprise feature

When creating Tasks with Custom Task Templates, there are a few new required fields to include.

| Name             | Type            | Description                                                        |
| :--------------- | :-------------- | :----------------------------------------------------------------- |
| customFieldGroup | string          | Required if using a specific template.                             |
| customFields     | array of object | Required *Only* include the custom fields defined in the template. |

Assume you have the following template made:

```json Custom Template model
{
    "id": "GpKsCxloxkvsdT16tcxRnwZ0",
    "name": "test templates 2",
    "deletedAt": null,
    "contextSaveConditions": [
        {
            "fieldName": "pickupTask",
            "comparison": "equal_to",
            "targetValue": true
        }
    ],
    "fields": [
        "test"
    ],
    "isDefault": false
}
```

In order to create a Task, your Task payload will require both `customFieldGroup` and `customFields` in the following example:

```json Custom Template Task Creation JSON payload body
{
  // ... insert all of the other task data here
  "customFieldGroup": "GpKsCxloxkvsdT16tcxRnwZ0",
  "customFields": [
    {
      "key": "test",
      "value": "test values"
    }
  ]
}
```

<br />