> ## Documentation Index
> Fetch the complete documentation index at: https://docs.worthai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom Fields with Onboarding Templates

> Set onboarding template custom fields from Send Business Invite, Add Business, and Update Business

If your account uses onboarding templates (full onboarding configuration), set custom field values in an `onboarding_custom_fields` object on the Send Business Invite, Add Business, and Update Business requests. Each key is a field ID from your onboarding template. These are the applications that Onboarding SDK 3 renders.

> [!NOTE]
>
> This page covers onboarding templates. For custom field templates, see [Custom Fields via Add Business and Update Business](https://docs.worthai.com/api-reference/case/businesses/add-update-business-custom-fields.md).

## Before You Start

* The fields must be custom fields in your onboarding template. Ask your Worth contact for the field IDs.
* The application must use an onboarding template. The template is chosen in this order:

  1. The template you send: a `template_version_id`, or a `template_definition_id` (its published version is used). Send one, not both.
  2. If you're inviting an existing business that already started onboarding, the template it started with.
  3. Your account's default onboarding template, if full onboarding configuration is enabled.

  If you send neither ID and full onboarding configuration is off, no onboarding template applies and `onboarding_custom_fields` is skipped. The request fails instead if you send an ID without full onboarding configuration enabled, if full onboarding configuration is enabled but your account has no default onboarding template, or if an existing business already started onboarding with a different template. See [Onboarding Template Errors](https://docs.worthai.com/onboarding-sdk-3/errors/send-business-invite.md).

## Where to Send Values

| Request | Endpoint | Keys accepted |
| - | - | - |
| [Send Business Invite](https://docs.worthai.com/api-reference/case/invites/send-business-invite.md) | `POST /case/api/v1/customers/{customerID}/businesses/invite` | Business fields only |
| [Add Business](https://docs.worthai.com/api-reference/add-or-update-business/add-business.md) | `POST /case/api/v1/businesses/customers/{customerID}` | Business and owner fields |
| [Update Business](https://docs.worthai.com/api-reference/add-or-update-business/update-business.md) | `PATCH /case/api/v1/businesses/customers/{customerID}` | Business and owner fields |

Update Business writes to the business's existing application created from an onboarding template. It does not take `template_version_id` or `template_definition_id`, and a business without one skips the values with a warning.

## Keys

| Key | Sets |
| - | - |
| `custom:<fieldId>` | A business field |
| `owner{n}_custom:<fieldId>` | A field of the owner in slot `{n}` of the same request, for example `owner1_custom:preferred_contact` for the owner sent as `owner1_*` |

A key that matches neither pattern, or a field no step of the template declares, is skipped.

## Value Formats

| Field type | Send | Example |
| - | - | - |
| Text, number | The value as you want it stored | `"250000"` |
| Select, radio | One of the field's option values (not its label). Matching ignores case | `"retail"` |
| Multi-select | An array of option values. Every item must be an option | `["loan", "advice"]` |
| Checkbox, boolean | `true` or `false`, or the strings `"true"` and `"false"` | `true` |
| Date | `YYYY-MM-DD`, a real calendar date with a year from 1900 to 2050 | `"2019-04-30"` |
| Document upload | Not supported. Documents can't be set through custom fields | |

A blank value (`null`, `""`, or `[]`) is ignored.

## Examples

**Send Business Invite:**

```json theme={null}
{
  "template_version_id": "{{TEMPLATE_VERSION_ID}}",
  "business": { "name": "Acme LLC" },
  "applicants": [{ "first_name": "Pat", "last_name": "Lee", "email": "applicant@example.com" }],
  "onboarding_custom_fields": {
    "custom:annual_revenue": "250000",
    "custom:industry": "retail",
    "custom:opened_on": "2019-04-30",
    "custom:is_franchise": true
  }
}
```

**Add Business:**

```json theme={null}
{
  "name": "Acme LLC",
  "template_definition_id": "{{TEMPLATE_DEFINITION_ID}}",
  "owner1_first_name": "Pat",
  "onboarding_custom_fields": {
    "custom:opened_on": "2019-04-30",
    "custom:services": ["loan", "advice"],
    "owner1_custom:preferred_contact": "email"
  }
}
```

## When a Value Can't Be Applied

A key that can't be applied is skipped. It never fails the request, and the other keys are still applied.

* **Add Business and Update Business** list each skipped key in the result's `warnings`, for example `onboarding_custom_fields.custom:opened_on was not applied: the value must be a date in YYYY-MM-DD format, with a year from 1900 to 2050`.
* **Send Business Invite** does not return skipped keys, so check values against the formats above before sending.

| Reason in the warning | Cause |
| - | - |
| the key is not `custom:<fieldId>` or `<prefix>{n}_custom:<fieldId>` | The key isn't `custom:<fieldId>` or `owner{n}_custom:<fieldId>` |
| no step of the template declares this field | The field ID isn't a custom field in your template |
| set a document field with document links | The field is a document upload |
| the value is not an option of this field | The value isn't one of the field's options |
| the value must be true or false | A checkbox or boolean got another value |
| the value must be a date in YYYY-MM-DD format, with a year from 1900 to 2050 | A date field got another format or an out-of-range date |

## Reading Values Back

[Get Case by ID](https://docs.worthai.com/api-reference/case/cases/get-customer-case-by-id.md) returns the custom field values of an application created from an onboarding template as `onboarding_custom_fields`, keyed `custom:<fieldId>`.

[Get Custom Fields](https://docs.worthai.com/api-reference/case/businesses/get-custom-fields.md) (`GET /businesses/{businessID}/custom-fields`) returns custom field template values only, so it returns an empty list for an application created from an onboarding template.

## Compared With Custom Field Templates

| | Custom field templates | Onboarding templates |
| - | - | - |
| Setup | Worth adds a custom field template to your environment | Fields are declared in your onboarding template |
| Request field | Top-level `custom:<id>` properties on Add Business and Update Business; `custom_fields` on the invite | `onboarding_custom_fields` object on the invite, Add Business, and Update Business |
| Owner fields | Not supported | `owner{n}_custom:<fieldId>` on Add Business and Update Business |
| Select and checkbox values | Label/value objects, stringified objects, or the value | The option value, or an array of values for multi-select |
| Dates | Not a supported type | `YYYY-MM-DD` |
| Invalid values | The request fails validation | The key is skipped with a warning; the request succeeds |

***

## Support

For questions or issues, please contact your Worth Customer Success team or reach out to [support@joinworth.com](mailto:support@joinworth.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.