---
schema_version: "1"
id: 59496967ff0f69b2a16a3bc7875d53944ac4c657518c84016b1e8522e55dfed1
title: JSON Validations
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/cg_reference_admin_json_validations.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.cg_reference_admin_json_validations.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 7a4c80a9842c29a1b68be7bae6927b7e745e2379235f738ebf411c63f16c6440
description: When you provide a custom JSON in an order template, the system verifies that the JSON is valid and that all required attributes are present. All attributes and attribute values are case-sensitive and the attributes must be part of the objects that they’re referred from.
products:
  - Consumer Goods
release: "264"
---
# JSON Validations

When you provide a custom JSON in an order template, the system verifies that the JSON is valid and that all required attributes are present. All attributes and attribute values are case-sensitive and the attributes must be part of the objects that they’re referred from.

See [Attributes of the Custom JSON](https://help.salesforce.com/s/articleView?id=ind.cg_reference_admin_attributes_of_customjson.htm&release=264.0.0&type=5 "Custom JSON for order templates uses attributes to specify the names, descriptions, and behavior of the fields in the various sections of the order.") for more information on the JSON attributes.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_admin-264-0-0-production-enus/5bb7d7f5-119d-42d0-8596-95e762837019/images/icon_note.png)

Note While adding custom fields, make sure the API names (fieldApiName) are unique and don’t match the API names of the Consumer Goods Cloud entities.

Apart from generic checks, here’s the list of specific checks for the individual JSON fields.

## Add Items JSON

- At least one field must have isColumn as true.
- At least one field must have isFilter as true.
- The Add Item JSON must have the Type field as one of the attributes.
- The Add Item JSON must have the Unit Type field from the Unit Of Measure object as one of the attributes.

## Free Items JSON

- The Free Item JSON must have at least one field from the Product object.
- All fields present must be part of the Order Items JSON as well.
- All fields from the Product object must be part of the Add Items JSON as well.

## Order Items JSON

- The Order Item JSON must have the Quantity field from the Order Items object as one of the attributes.
- The Order Item JSON must have the Unit Type field from the Order Items object as one of the attributes.
- The Order Item JSON must have at least one field from the Product object.
- All fields from the Product object must be a part of the Add Items JSON as well.
- fieldType for the Data Type field must be from the list of data types (boolean, currency, date, URL, icon, number, percent, picklist, related object name).

## Order Details JSON

- At least one field from an object must be present.

## Order Page Header JSON

- At least one field from an object must be present.