By defining a complex field in the object structure, you can store complex sub-documents as part of the data or record in the object. A complex metadata feature is used to create a complex field by nesting multiple fields with different data types—such as strings or numbers—into a single field. These fields can be used to collect data from multiple sources and present it in a more helpful format, such as a location or address.

You can define complex fields using only primitive data types.

To create a complex metadata

  1. Log in to the Conga Platform as an admin user.
  2. Click the App Launcher () icon from the top-left corner > Admin Console > Schema Manager.
  3. Use basic search to locate the object you will update. Click the object name to open object details.
  4. Go to the Complex Metadata tab and click Create Complex Metadata.
  5. Enter a name for the Complex Field Metadata. This value appears in the Complex Metadata Name field when you create a new complex field for an object.
  6. Under the Field Details, enter or select values in the following fields:

    FieldDescription
    Field NameEnter a user-friendly field name for the field.
    Display NameAccept this value or change it to override the default, which is auto-populated from the field name. For example, entering Test 123 in the field name auto-populates the display name as "Test_123".
    DescriptionEnter a description of the field.
    Data Type

    Select the data type from the list. Other fields are rendered based on the data type selection. For more information on default values and other fields related to specific data types, see Creating and Managing Fields.

    The Complex Field Metadata supports Boolean (true/false), String (text), Date Time (date and time), Identifier (unique identification), LongString (long text), Double (decimal numbers), Integer (whole numbers), and Date data types.

  7. Click the Add Field link to add more fields.
  8. Click Save.

Sample of JSON metadata with a Complex field type

To understand the concept of a Complex Metadata field, let's consider a JSON example in which a complex field called PrimaryContact is nested within the Account object. The structure is defined in the ComplexFieldMetadata section labeled as PrimaryContactMetadata. This field has subfields like ID, Name, Phone1, StartDate, etc. To query these subfields, mark them as IsIndexed.

{
    "Name": "Account",
    "DisplayName": "Account",
    "Description": "Account",
    "IsShared": false,
    "Category": "CLM",
    "FieldMetadata": [
        {
            "FieldName": "AccountType",
            "DisplayName": "AccountType",
            "Description": "AccountType Desc",
            "DataType": "String",
            "Length": 25,
            "IsRequired": false,
            "IsSortable": false,
            "IsUnique": false,
            "IsProtected": false,
            "IsDeprecated": false,
            "LookupObjectName": null,
            "PicklistName": null,
            "AutoNumberInitialSeed": 0,
            "Precision": 0,
            "Scale": 0,
            "IsIndexField": false,
            "IsCalculated": false,
            "Expression": "string",
            "ExpressionDependency": null
        },        
        {
            "FieldName": "PrimaryContact",
            "DisplayName": "PrimaryContact",
            "Description": "PrimaryContact Desc",
            "DataType": "Complex",
            "ComplexMetadataName": "PrimaryContactMetadata",
            "IsRequired": false,
            "IsSortable": false,
            "IsUnique": false,
            "IsProtected": false,
            "IsDeprecated": false,
            "LookupObjectName": null,
            "PicklistName": null,
            "AutoNumberInitialSeed": 0,
            "Precision": 0,
            "Scale": 0,
            "IsIndexField": true,
            "IsCalculated": false,
            "Expression": "",
            "ExpressionDependency": null
        }
    ],
    "ComplexFieldMetadata": [
        {
                "Name": "PrimaryContactMetadata",
                "Fields": [
                    {
                        "FieldName": "Id",
                        "DisplayName": null,
                        "Description": null,
                        "DataType": "String",
                        "DefaultValue": null,
                        "IsProtected": true,
                        "IsIndexField": true,
                        "IsSortable": false,
                        "IsRequired": false,
                        "IsUnique": false,
                        "IsDeprecated": false,
                        "Length": 50,
                        "LookupObjectName": null,
                        "PicklistName": null,
                        "ComplexMetadataName": null,
                        "AutoNumberInitialSeed": 0,
                        "Precision": 0,
                        "Scale": 0,
                        "IsCalculated": false,
                        "Expression": null,
                        "ExpressionDependency": null
                    },
                    {
                        "FieldName": "Name",
                        "DisplayName": null,
                        "Description": null,
                        "DataType": "String",
                        "DefaultValue": null,
                        "IsProtected": true,
                        "IsIndexField": true,
                        "IsSortable": false,
                        "IsRequired": false,
                        "IsUnique": false,
                        "IsDeprecated": false,
                        "Length": 50,
                        "LookupObjectName": null,
                        "PicklistName": null,
                        "ComplexMetadataName": null,
                        "AutoNumberInitialSeed": 0,
                        "Precision": 0,
                        "Scale": 0,
                        "IsCalculated": false,
                        "Expression": null,
                        "ExpressionDependency": null
                    },
                    {
                        "FieldName": "Phone1",
                        "DisplayName": null,
                        "Description": null,
                        "DataType": "Int",
                        "DefaultValue": null,
                        "IsProtected": true,
                        "IsIndexField": true,
                        "IsSortable": true,
                        "IsRequired": false,
                        "IsUnique": false,
                        "IsDeprecated": false,
                        "Length": null,
                        "LookupObjectName": null,
                        "PicklistName": null,
                        "ComplexMetadataName": null,
                        "AutoNumberInitialSeed": 0,
                        "Precision": 0,
                        "Scale": 0,
                        "IsCalculated": false,
                        "Expression": null,
                        "ExpressionDependency": null
                    }
                    {
                        "FieldName": "StartDate",
                        "DisplayName": null,
                        "Description": null,
                        "DataType": "DateTime",
                        "DefaultValue": null,
                        "IsProtected": true,
                        "IsIndexField": true,
                        "IsSortable": false,
                        "IsRequired": false,
                        "IsUnique": false,
                        "IsDeprecated": false,
                        "Length": null,
                        "LookupObjectName": null,
                        "PicklistName": null,
                        "ComplexMetadataName": null,
                        "AutoNumberInitialSeed": 0,
                        "Precision": 0,
                        "Scale": 0,
                        "IsCalculated": false,
                        "Expression": null,
                        "ExpressionDependency": null
                    }
                ]
            }
    ],
    "PicklistMetadata": [],
    "DependentObjectMetadata": []
}
CODE

Fields of data type Complex do not support sorting.

Sample of JSON metadata with a Complex Array field type

To understand the concept of a Complex Metadata field, let's consider a JSON example in which a complex array field called Products is nested within the PriceList object. The structure is defined in the ComplexFieldMetadata section labeled as ProductMetadata. It means that within the PriceList object, there is a field called Products which is of a complex array data type and has sub-fields like ID, Name, Product Code, etc.

{
    "Name": "PriceList",
    "DisplayName": "PriceList",
    "Description": "PriceList",
    "IsShared": false,
    "Category": "CLM",
    "FieldMetadata": [
        {
            "FieldName": "EffectiveDate",
            "DisplayName": "EffectiveDate",
            "Description": "EffectiveDate Desc",
            "DataType": "DateTime",
            "DefaultValue": null,
            "IsProtected": true,
            "IsIndexField": true,
            "IsSortable": true,
            "IsRequired": false,
            "IsUnique": false,
            "IsDeprecated": false,
            "Length": null,
            "LookupObjectName": null,
            "PicklistName": null,
            "ComplexMetadataName": null,
            "AutoNumberInitialSeed": 0,
            "Precision": 0,
            "Scale": 0,
            "IsCalculated": false,
            "Expression": null,
            "ExpressionDependency": null
        },
        {
            "FieldName": "ExpirationDate",
            "DisplayName": "ExpirationDate",
            "Description": "ExpirationDate Desc",
            "DataType": "DateTime",
            "DefaultValue": null,
            "IsProtected": true,
            "IsIndexField": true,
            "IsSortable": true,
            "IsRequired": false,
            "IsUnique": false,
            "IsDeprecated": false,
            "Length": null,
            "LookupObjectName": null,
            "PicklistName": null,
            "ComplexMetadataName": null,
            "AutoNumberInitialSeed": 0,
            "Precision": 0,
            "Scale": 0,
            "IsCalculated": false,
            "Expression": null,
            "ExpressionDependency": null
        },
        {
            "FieldName": "Products",
            "DisplayName": "Products",
            "Description": "Products Desc",
            "DataType": "ComplexArray",
            "DefaultValue": null,
            "IsProtected": true,
            "IsIndexField": false,
            "IsSortable": false,
            "IsRequired": false,
            "IsUnique": false,
            "IsDeprecated": false,
            "Length": null,
            "LookupObjectName": null,
            "PicklistName": null,
            "ComplexMetadataName": "ProductMetadata",
            "AutoNumberInitialSeed": 0,
            "Precision": 0,
            "Scale": 0,
            "IsCalculated": false,
            "Expression": null,
            "ExpressionDependency": null
        }
    ],
    "PicklistMetadata": [],
    "ComplexFieldMetadata": [
        {
            "Name": "ProductMetadata",
            "Fields": [
                {
                    "FieldName": "Id",
                    "DisplayName": "Id",
                    "Description": "Id",
                    "DataType": "String",
                    "DefaultValue": null,
                    "IsProtected": true,
                    "IsIndexField": false,
                    "IsSortable": false,
                    "IsRequired": false,
                    "IsUnique": false,
                    "IsDeprecated": false,
                    "Length": 25,
                    "LookupObjectName": null,
                    "PicklistName": null,
                    "ComplexMetadataName": null,
                    "AutoNumberInitialSeed": 0,
                    "Precision": 0,
                    "Scale": 0,
                    "IsCalculated": false,
                    "Expression": null,
                    "ExpressionDependency": null
                }
                {
                    "FieldName": "Name",
                    "DisplayName": "Name",
                    "Description": "Name",
                    "DataType": "String",
                    "DefaultValue": null,
                    "IsProtected": true,
                    "IsIndexField": false,
                    "IsSortable": false,
                    "IsRequired": false,
                    "IsUnique": false,
                    "IsDeprecated": false,
                    "Length": 255,
                    "LookupObjectName": null,
                    "PicklistName": null,
                    "ComplexMetadataName": null,
                    "AutoNumberInitialSeed": 0,
                    "Precision": 0,
                    "Scale": 0,
                    "IsCalculated": false,
                    "Expression": null,
                    "ExpressionDependency": null
                },
                {
                    "FieldName": "ProductCode",
                    "DisplayName": "ProductCode",
                    "Description": "ProductCode",
                    "DataType": "String",
                    "DefaultValue": null,
                    "IsProtected": true,
                    "IsIndexField": true,
                    "IsSortable": true,
                    "IsRequired": false,
                    "IsUnique": false,
                    "IsDeprecated": false,
                    "Length": 100,
                    "LookupObjectName": null,
                    "PicklistName": null,
                    "ComplexMetadataName": null,
                    "AutoNumberInitialSeed": 0,
                    "Precision": 0,
                    "Scale": 0,
                    "IsCalculated": false,
                    "Expression": null,
                    "ExpressionDependency": null
                }
            ]
        }
    ]
}
CODE

Fields of data type Complex Array do not support sorting, querying, or indexing

To update complex metadata

  1. Go to the Complex Metadata tab and click the Complex Metadata Name link. The list of fields associated with the complex metadata appears.
  2. Click the More () icon for the relevant field and select Edit.
  3. Modify the required fields as necessary.
  4. Click Save.

To add a field to existing complex metadata

  1. Go to the Complex Metadata tab and click the Complex Metadata Name link.
  2. Click Create New Field. The Create Complex Field screen appears.
  3. Enter or select values in the following fields:

    FieldDescription
    Field NameEnter a user-friendly field name for the field.
    Display NameAccept this value or change it to override the default, which is auto-populated from the field name. For example, entering Test 123 in the field name auto-populates the display name as "Test_123".
    DescriptionEnter a description of the field.
    Data Type

    Select the data type from the list. Other fields are rendered based on the data type selection. For more information on default values and other fields related to specific data types, see Creating and Managing Fields.

    The Complex Field Metadata supports Boolean (true/false), String (text), Date Time (date and time), Identifier (unique identification), LongString (long text), Double (decimal numbers), Integer (whole numbers), and Date data types.

  4. Click the Add Field link to add more fields.
  5. Click Save.