## Related terms

- schema
- dynamic\-key
- expression
- metric
- aggregate
- ai\-recommendation
- catalog
- voucher
- profile
- attribute
- synerise\-jinjava
- data\-modeling\-hub

See the [glossary](/glossary.md) for definitions.

---

# Synerise objects


Synerise object fields are powerful tools which let you access data from other Synerise modules.

## Common field properties



These properties exist in multiple field types:

- **Display name** (required): A human-readable name for the field, shown in the record editor. 
- **API name** (required): A system name for the field.  
    -  In the `{{ record.APIname }}` insert, this name is the `APIname`
    -  When retrieving/creating/updating a record with the API, this name is the identifier of the field.
    -  When generating an object from a record, this is the name of the key that stores the field's value.
- **Description**: A human-readable description of the field's purpose, shown in the record editor.
- **Block record-level overwriting**: Disables changing any values in this field in individual records. You must provide a default value, which will be applied to all records in the schema.
- **Return null when object is missing**: If the requested object (such as an expression result or external source) doesn't exist, the field returns `null` instead of causing an error in content generation.
- **Conditional visibility**: Enforces adding a value to a field when another field meets a condition.  
    See [explanation below](#conditional-visibility).
- **Use as record title**: If the record doesn't have a set name, the value of the field is used as the name.
- **Required field**: A record can only be saved if a value for this field is provided.
- **Default value**: The provided value will be used for object generation in records where a value is not set.  
  This is only used when a value isn't defined in a record. It is **not a fallback**. For example, if an expression referenced in a record returns null or an error, the system **doesn't** use the default value. Default values are optional.
- **Unique values only**: No other record in the schema may have the same value for this field.  
    You can use this to store your own unique record identifiers.  
    The number of fields with this setting is [limited](/docs/assets/brickworks/limits).
- **Enable search & filtering**: The value can be used when searching and filtering records.  
    The number of fields with this setting is [limited](/docs/assets/brickworks/limits).

### Conditional visibility
You can enforce entering a value into a field when another field meets a condition. If the condition isn't met, the field with this setting isn't visible in the schema editor/viewer.

The field that appears when the condition is met must have a default value (because it's required).

**Example**:  
<figure><img src="/api/docs/image/219f337699cf7b17198d03b7a7c7f148886e25a1/docs/assets/brickworks/_gfx/conditional.png" class="medium" alt="Conditional display example: the Account number field is only available (and must be filled) when the Payment Type field (enumeration) is not cash"><figcaption>the <strong>Account number</strong> field is only available (and must be filled) when the <strong>Payment Type</strong> field (enumeration) is not <code>"cash"</code></figcaption></figure>

**Operators**:  
The available operators depend on the type of the field that is checked:
| String | Number | Boolean | Enumeration |
| --- | --- | --- | --- |
| <ul><li>Equals</li><li>Contains</li><li>Is empty</li><li>Is not empty</li></ul> | <ul><li>Equals</li><li>Does not equal</li><li>Greater than</li><li>Less than</li><li>Is empty</li><li>Is not empty</li></ul> | <ul><li>Is true</li><li>Is false</li></ul> | <ul><li>Equals</li><li>Does not equal</li></ul> |



## Synerise object field summary

When creating schemas and defining records, you can leverage existing data within Synerise by adding Synerise objects as fields. These objects enable advanced personalization and dynamic content, such as:

- personalizing messages using expression or aggregate results
- implementing social proof through metric insights
- delivering AI-driven item recommendations
- distributing discount codes
- displaying detailed information stored in catalogs

| Field name                                                   | Stored values                                                                                                                                     | Primitive data type                                               | Can be searchable<sup>1</sup>                                                 | Can be unique<sup>2</sup>                                                     | Accepts Jinjava                                                   | Nullable |
| ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | --- |
| [Profile attribute](#profile-attribute)  | Inserts the value of an attribute from the context profile            | - | - | - | -  | + |
| [Expression](#expression)                | This field type lets you add a dropdown with a list of [expressions](/docs/crm/expressions). This way you can display an expression result in a record.                             | - | - | - | -  | + |
| [Metric](#metric)                        | This field type lets you add a dropdown with a list of [metrics](/docs/analytics/metrics/ ). This way, you can display a metric result in a record.                                        | - | - | - | -  | + |
| [Aggregate](#aggregate)                  | This field type lets you add a dropdown with a list of [aggregates](/docs/crm/aggregates). This way you can display an aggregate result in a record.                                | - | - | - | -  | + |
| [Voucher](#voucher)                      | This field type lets you add a dropdown with a list of [voucher pools](/docs/assets/code-pools) and select a code from the pool.                                                          | - | - | - | + | + |
| [AI Recommendations](#ai-recommendation) | This field type lets you add a dropdown with list of [AI recommendations](/docs/ai-hub/recommendations-v2). This way you can display the recommendation results in a record.            | - | - | - | + | + |
| [AI Search](#ai-search)                  | Shows the result of a search query            | - | - | - | -  | + |
| [AI Search listing](#ai-search-listing)  | Shows the result of a listing from a search index            | - | - | - | -  | + |
| [Catalog](#catalog)                      | This field type lets you select a [Synerise catalog](/docs/assets/catalogs) as a context for data displayed in a record, for example, if you want to display information about a product. | - | - | - | -  | + |

<sup>1,2</sup>The number of fields with this setting is [limited](/docs/assets/brickworks/limits).

## Single and multiple values

These field types can store one object or a list of objects: [Expression](#expression), [Metric](#metric), [Aggregate](#aggregate), [Voucher](#voucher), [AI recommendation](#ai-recommendation), and [Catalog](#catalog).

### Configuring the field in a schema

When you add one of these fields to a schema, in **Value type**, select one of the following options:
- **Single value**: The field references one object, for example, one expression or one recommendation campaign.
- **Multiple values**: The field references a list of objects, for example, several expressions or several recommendation campaigns. The number of objects in the list and the number of multiple-value fields in a schema are [limited](/docs/assets/brickworks/limits).

The value type doesn't limit the number of results. For example, a single-value AI recommendation field generates recommendations from one campaign, and that campaign can return many items.

You can't change this setting after the field is created.

<figure><img src="/api/docs/image/219f337699cf7b17198d03b7a7c7f148886e25a1/docs/assets/brickworks/_gfx/brickworks-multiple-values-schema.png" class="medium" alt="Configuration of a Synerise object field in the schema editor with Multiple values selected as the value type and the Remove missing objects from the list option enabled"><figcaption>Configuration of a multiple-value Synerise object field in the schema editor</figcaption></figure>

If you select **Multiple values**, you can define how the field handles objects that can't be loaded (for example, because they were deleted or return an error):

| Skip objects that cannot be loaded | Remove missing objects from the list | Result |
| --- | --- | --- |
| - | - | Generating content from the record fails. |
| - | + | Generating content from the record fails. |
| + | - | The object that can't be loaded is returned as `null`, so the positions of the other objects don't change. |
| + | + | The object that can't be loaded is removed from the list and the remaining objects move up. |


<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

Objects without a result, for example, expressions that return no value for the profile, aren't treated as objects that can't be loaded. They're returned as `null` regardless of the **Skip objects that cannot be loaded** setting. If **Remove missing objects from the list** is enabled, they're removed from the list.

</div></div></div>


### Adding objects in a record

To add an object to a multiple-value field in a record, click the button for the object type, for example, **Add metric**. To change the order of the objects, drag them by the handle on the left.

<figure><img src="/api/docs/image/219f337699cf7b17198d03b7a7c7f148886e25a1/docs/assets/brickworks/_gfx/brickworks-multiple-values-record.png" class="medium" alt="An empty multiple-value Metric field in the record editor with the Add metric button and the Items: 0/5 counter"><figcaption>An empty multiple-value Metric field in the record editor</figcaption></figure>

Some field types work differently:
- **Catalog**: You select one catalog and add items from it by clicking **Add item**.  
    <figure><img src="/api/docs/image/219f337699cf7b17198d03b7a7c7f148886e25a1/docs/assets/brickworks/_gfx/brickworks-multiple-values-catalog-record.png" class="medium" alt="An empty multiple-value Catalog field in the record editor with the Select catalog option, the Add item button, and the Items: 0/10 counter"><figcaption>A multiple-value Catalog field in the record editor</figcaption></figure>
- **AI recommendation**: You provide one context item ID for the whole list, in the **Item context** field above the list. It applies to all recommendations in the list.  
    <figure><img src="/api/docs/image/219f337699cf7b17198d03b7a7c7f148886e25a1/docs/assets/brickworks/_gfx/brickworks-multiple-values-recommendation-record.png" class="medium" alt="A multiple-value AI Recommendations field in the record editor with the Item context field above the list, the hint Applies to every recommendation on the list, an empty Select recommendation slot, and the Add recommendation button"><figcaption>A multiple-value AI recommendation field in the record editor</figcaption></figure>

### Generated content

When a field stores multiple values, the generated content is a list of results, in the order set in the record. In Expression, Metric, Aggregate, Voucher, and Catalog fields, each element of the list has the same format as the result of a single-value field. For example, a Voucher field with two voucher pools returns:


<pre><code class="language-json">[
    {
        "barcode": "5281235506"
    },
    {
        "barcode": "ThisIsTheCode68"
    }
]</code></pre>


In an AI recommendation field, each element of the list is a separate recommendation frame with its own `data` and `extras` objects.

## Dynamic keys

Expression, Metric, and Aggregate fields can use objects with [dynamic keys](/docs/analytics/static-and-dynamic-analyses). To provide the values of dynamic keys in records, select an object with dynamic keys as the default value of the field:

1. In the field configuration in the schema, select **Default value**.
2. Select an object that uses dynamic keys.  
    The **Dynamic keys** section appears, with a field for each dynamic key of the selected object.
3. For each dynamic key:
    1. Click the icon on the left side of the field and select the format of the value: **String** or **Jinjava**.  
        The format can't be changed per record.
    2. Enter the default value of the key.

<figure><img src="/api/docs/image/219f337699cf7b17198d03b7a7c7f148886e25a1/docs/assets/brickworks/_gfx/brickworks-dynamic-keys-schema.png" class="medium" alt="Configuration of a multiple-value Metric field in the schema editor: a default metric with the shopId dynamic key is selected, and the Dynamic keys section below shows the shopId field with the value 1 in the String format"><figcaption>Dynamic keys of the default metric in the schema editor</figcaption></figure>

In a record, the **Dynamic keys** section shows the keys of the default object, regardless of the object selected in the record. You can change their values.

If the field has no default value, or the default value doesn't use dynamic keys, the section isn't available in records. Objects with dynamic keys are then calculated with the key values defined in the object itself.

### Dynamic keys in single-value fields

In a record, you can select any object, with or without dynamic keys. You can only provide values for the keys of the default object.

**Example**: The default metric uses the `shopId` dynamic key. In a record:
- If you select another metric that uses `shopId`, you can change the value of `shopId` for that metric.
- If you select a metric that uses `shopId` and `region`, the **Dynamic keys** section shows only `shopId`. You can't provide a value for `region`.
- If you select a metric without dynamic keys, the **Dynamic keys** section still shows `shopId`.

### Dynamic keys in multiple-value fields

In a multiple-value field, the default value is a list of objects. In the schema, you can add objects to it by clicking the button for the object type, for example, **Add metric**.

All objects in the field must use the same set of dynamic keys:
- In the schema, the first object on the default list determines the set of dynamic keys. You can only add objects with the same set of dynamic keys to the default list.
- In a record:
    - If the default value uses dynamic keys, you can only add objects that use exactly the same set of dynamic keys.
    - If the default value doesn't use dynamic keys or isn't set, you can only add objects without dynamic keys.

Objects that don't meet this condition are grayed out in the selection list.

The values of dynamic keys apply to all objects in the field. You provide them once for the whole list, not for each object separately.

**Example**: The default metric uses the `shopId` dynamic key. You can add other metrics that use only `shopId`. A metric that uses `shopId` and another dynamic key is grayed out.

## Synerise object field reference

### Profile attribute

This field lets you insert the value of an attribute from the profile for which content is generated from a record.

#### Field configuration in a schema

In **Default value**, you can select the default attribute to be inserted.

### Expression

This field type lets you select an [expression](/docs/crm/expressions). The result of the expression is calculated in the context of a profile when generating an object from a record.

You can only use attribute expressions (**Expressions for: Attribute**) in this field.


<div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

Expressions without a result are generated as `null` when generating content from the record.

</div></div></div>


#### Field configuration in a schema   

1. In **Value type**, select **Single value** or **Multiple values**.  
    For details, see [Single and multiple values](#single-and-multiple-values).
2. In **Default value**, you can select the default expression.  
    The default expression also defines which dynamic keys can be set in records. For details, see [Dynamic keys](#dynamic-keys).
3. If you want to return the full scope of information about the expression, select the **Include details in results** checkbox.  

#### Object generation example
Expressions don't require extra parameters in the object generation request.  
In the following example, an expression calculates the age of the customer.  
    
<div class="content-tabs" data-tab-group="tabgrp-1379">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1379-0" data-tab-group="tabgrp-1379" data-tab-active="true">Generated content with details</button><button class="tab-button" data-tab-id="tabgrp-1379-1" data-tab-group="tabgrp-1379">Generated content without details</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1379-0" data-tab-group="tabgrp-1379" data-tab-active="true">

<pre><code class="language-json">{
    "name": "Demo calculate age",
    "clientId": 11804828266,
    "result": 26,
    "expressionId": "b2c5cc0b-2830-435f-82a6-a2f0ebadd6d9",
    "variables": [],
    "title": "Demo calculate age "
}</code></pre>

</div>

<div class="tab-panel" data-tab-id="tabgrp-1379-1" data-tab-group="tabgrp-1379">

<pre><code class="language-json">26</code></pre>

</div>
</div>



### Metric

This field type lets you select a [metric](/docs/analytics/metrics). The result of the metric is calculated in the context of a profile when generating an object from a record.

#### Field configuration in a schema  

1. In **Value type**, select **Single value** or **Multiple values**.  
    For details, see [Single and multiple values](#single-and-multiple-values).
2. In **Default value**, you can select the default metric to calculate.  
    The default metric also defines which dynamic keys can be set in records. For details, see [Dynamic keys](#dynamic-keys).
3. If you want to return the full scope of information about the metric, select the **Include details in results** checkbox.  

#### Object generation example
Metrics don't require extra parameters in the object generation request.
    
<div class="content-tabs" data-tab-group="tabgrp-1380">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1380-0" data-tab-group="tabgrp-1380" data-tab-active="true">Generated content with details</button><button class="tab-button" data-tab-id="tabgrp-1380-1" data-tab-group="tabgrp-1380">Generated content without details</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1380-0" data-tab-group="tabgrp-1380" data-tab-active="true">

<pre><code class="language-json">{
    "result": 10770077,
    "numberMetrics": [],
    "clientMetrics": [],
    "eventMetrics": []
}</code></pre>

</div>

<div class="tab-panel" data-tab-id="tabgrp-1380-1" data-tab-group="tabgrp-1380">

<pre><code class="language-json">10770077</code></pre>

</div>
</div>



### Aggregate

This field type lets you select an [aggregate](/docs/crm/aggregates). The result of the aggregate is calculated in the context of a profile when generating an object from a record.


<div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

- For "TOP_MULTI" aggregates with the "Return null when object is missing" setting, the Brickworks result is an empty array (`[]`).
- In other aggregate types, when the aggregate results in no value, the Brickworks result is `null`.

</div></div></div>


#### Field configuration in a schema
1. In **Value type**, select **Single value** or **Multiple values**.  
    For details, see [Single and multiple values](#single-and-multiple-values).
2. In **Default value**, you can select the default aggregate.  
    The default aggregate also defines which dynamic keys can be set in records. For details, see [Dynamic keys](#dynamic-keys).
3. If you want to return the full scope of information about the aggregate, select the **Include details in results** checkbox.  

#### Object generation example
Aggregates don't require extra parameters in the object generation request.  
In the following example, the aggregate returns an item ID.
    
<div class="content-tabs" data-tab-group="tabgrp-1381">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1381-0" data-tab-group="tabgrp-1381" data-tab-active="true">Generated content with details</button><button class="tab-button" data-tab-id="tabgrp-1381-1" data-tab-group="tabgrp-1381">Generated content without details</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1381-0" data-tab-group="tabgrp-1381" data-tab-active="true">

<pre><code class="language-json">{
    "dateFilter": {
        "type": "RELATIVE",
        "duration": {
            "type": "DAYS",
            "value": 30
        },
        "offset": {
            "type": "DAYS",
            "value": 0
        },
        "timeZone": "Europe/Warsaw"
    },
    "clientId": 11804828266,
    "result": "WINDBREAKER ZEPHYR",
    "variables": [],
    "analyticVersion": null,
    "title": "Last seen item from jacket category",
    "aggregateUuid": "8c950378-82fd-320d-abec-b90cec5208d5",
    "aggregateId": "8c950378-82fd-320d-abec-b90cec5208d5"
}</code></pre>

</div>

<div class="tab-panel" data-tab-id="tabgrp-1381-1" data-tab-group="tabgrp-1381">

<pre><code class="language-json">"WINDBREAKER ZEPHYR"</code></pre>

</div>
</div>



### Voucher

This field type lets you return a code from a [voucher pool](/docs/assets/code-pools). 

#### Field configuration in a schema  

1. In **Value type**, select **Single value** or **Multiple values**.  
    For details, see [Single and multiple values](#single-and-multiple-values).
2. In **Default value**, you can select a default pool to get codes from.
3. If you want to assign a voucher and always return the same voucher in subsequent requests for this profile, select the **Assign to user** checkbox.  
    This setting can be changed per record.

#### Object generation example
The voucher code is returned in the `barcode` key.  
Vouchers don't require extra parameters in the object generation request.

<pre><code class="language-json">{
    "barcode": "23123321321"
},</code></pre>



### AI recommendation

This field type lets you include [AI recommendations](/docs/ai-hub/recommendations-v2).

For each record, you can select a recommendation and display its results while generating an object with the record result. If a selected recommendation model requires an item context, you must provide it. The system checks for the context item in the following order:
1. ID provided in the object generation request.
2. ID from the record.
3. Default ID from the schema.

In the ["Recommendation model summary" section](/docs/ai-hub/recommendations-v2/recommendation-types#recommendation-model-summary), you can find a table in which you can check which recommendation models require an item context.

#### Field configuration in a schema
1. In **Value type**, select **Single value** or **Multiple values**.  
    For details, see [Single and multiple values](#single-and-multiple-values).
2. From the **Item context format** dropdown list, select how the context item ID is inserted:
    - **String** to provide a static string.
    - **Jinjava** to provide an insert from which the ID will be extracted.  
    The value can be changed per record or when generating an object from the record, but the type (static string or Jinjava) is enforced by the schema.  
    See the [Recommendation model summary](/docs/ai-hub/recommendations-v2/recommendation-types#recommendation-model-summary) to learn when a context item ID is required.  
    If the field stores multiple recommendations, the context item ID applies to all of them.
3. In **Default value**, you can set the default:
    - Recommendation campaign
    - Context item ID

#### Object generation example




<div class="content-tabs" data-tab-group="tabgrp-1382">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1382-0" data-tab-group="tabgrp-1382" data-tab-active="true">Request</button><button class="tab-button" data-tab-id="tabgrp-1382-1" data-tab-group="tabgrp-1382">Generated content</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1382-0" data-tab-group="tabgrp-1382" data-tab-active="true">

When generating an object from a record, you can provide an item context. This overrides the default from the schema and the values saved in the record.  
This data is provided in the `fieldContext.FIELDNAME` object.  
You can also add any additional request properties described in the ["Get recommendations by campaign" endpoint in the API reference](https://hub.synerise.com/api-reference/ai-recommendations#tag/Recommendations/operation/GetRecommendationsByCampaignV2). In the following example, `additionalFilters` is such a field.

<pre><code class="language-json">"fieldContext": {
    "exampleRecommendation": {
        "itemId": "dd9f0a0e6ca8f385776c14de9dd277",
        "additionalFilters": "brand == exampleBrand"
    }
}</code></pre>

</div>

<div class="tab-panel" data-tab-id="tabgrp-1382-1" data-tab-group="tabgrp-1382">

The result is a recommendation frame, same as in the recommendations API. To learn more about the properties, see the "[Get recommendations by campaign" endpoint in the API reference](https://hub.synerise.com/api-reference/ai-recommendations#tag/Recommendations/operation/GetRecommendationsByCampaignV2).

<pre><code class="language-json">{
    "data": [
        {
            "name": "Infurniture - Jazmin Wine Glass",
            "price": 59,
            "brand": {
                "id": "86",
                "label": "Infurniture"
            },
            "product_subtype": {
                "id": "113",
                "label": "Wine Glass"
            },
            "itemId": "dd9f0a0e6ca8f385776c14de9dd277",
            "category": "Root Catalog &gt; Default Category &gt; Home &gt; Glasses",
            "productUrl": "https://demoshop.synerise.com/infurniture-jazmin-wine-glass.html?snrai_campaign=yYjFMYPeofN5&amp;snrai_id=9bbaee0d-b2d1-4a0f-9af2-1f2d49ae28d4",
            "image": "https://demoshop.synerise.com/media/catalog/product/d/d/dd9f0a0e6ca8f385776c14de9dd277.png"
        },
        {
            "name": "Lahome - Arcangel Chef's Knife",
            "price": 139,
            "brand": {
                "id": "87",
                "label": "Lahome"
            },
            "product_subtype": {
                "id": "123",
                "label": "Chef's Knife"
            },
            "itemId": "a84fe2f02fc18986600f956bb22864",
            "category": "Root Catalog &gt; Default Category &gt; Home &gt; Knives",
            "productUrl": "https://demoshop.synerise.com/lahome-arcangel-chef-s-knife.html?snrai_campaign=yYjFMYPeofN5&amp;snrai_id=9bbaee0d-b2d1-4a0f-9af2-1f2d49ae28d4",
            "image": "https://demoshop.synerise.com/media/catalog/product/a/8/a84fe2f02fc18986600f956bb22864.png"
        },
        {
            "name": "Homeset - Montell Bread Knife",
            "price": 389,
            "brand": {
                "id": "85",
                "label": "Homeset"
            },
            "product_subtype": {
                "id": "124",
                "label": "Bread Knife"
            },
            "itemId": "3640594393744b17d72aa3996c25f7",
            "category": "Root Catalog &gt; Default Category &gt; Home &gt; Knives",
            "productUrl": "https://demoshop.synerise.com/homeset-montell-bread-knife.html?snrai_campaign=yYjFMYPeofN5&amp;snrai_id=9bbaee0d-b2d1-4a0f-9af2-1f2d49ae28d4",
            "image": "https://demoshop.synerise.com/media/catalog/product/3/6/3640594393744b17d72aa3996c25f7.png"
        }
    ],
    "extras": {
        "campaignId": "yYjFMYPeofN5",
        "contextItems": null,
        "correlationId": "9bbaee0d-b2d1-4a0f-9af2-1f2d49ae28d4",
        "slots": [
            {
                "id": 0,
                "itemIds": [
                    "dd9f0a0e6ca8f385776c14de9dd277",
                    "a84fe2f02fc18986600f956bb22864",
                    "3640594393744b17d72aa3996c25f7"
                ],
                "name": "Unnamed slot",
                "rows": null
            }
        ]
    }
}</code></pre>

</div>
</div>


### AI Search

This field lets you show the results of an [AI search](/docs/ai-hub/ai-search/introduction-to-ai-search#types-of-search-requests) query.

#### Field configuration in a schema

1. From the **Query format** dropdown list, select how the query can be entered:
    - **String** to provide a static string.
    - **Jinjava** to provide an insert from which the query will be extracted.  
    The value can be changed per record or when generating an object from the record, but the type (static string or Jinjava) is enforced by the schema.  
2. In **Default value**, you can select the default:
   - Search index
   - Query text

#### Object generation example

The result in a generated object is a response from the [/search/v2/indices/{indexId}/query](https://hub.synerise.com/api-reference/ai-search#tag/Search/operation/SearchFullTextGet) endpoint.

```json
{
    "data": [
        {
            "itemId": "example1"
        }
    ],
    "extras": {
        "facetsOrdering": [],
        "appliedRules": [],
        "suggestions": [],
        "searchId": "fb4f34dec80bcf2be335b6bd0602e7b9",
        "correlationId": "fb4f34dec80bcf2be335b6bd0602e7b9"
    }
}
```

### AI Search listing

This field lets you show the results of an [AI search listing](/docs/ai-hub/ai-search/introduction-to-ai-search#types-of-search-requests) query.

#### Field configuration in a schema

In **Default value**, you can select the default search index.

#### Object generation example

The result in a generated object is a response from the [/search/v2/indices/{indexId}/list](https://hub.synerise.com/api-reference/ai-search#tag/Listing/operation/ListingGet) endpoint.

```json
{
    "data": [
        {
            "itemId": "example1"
        },
        {
            "itemId": "example2"
        },
        {
            "itemId": "example3"
        }
    ],
    "extras": {
        "facetsOrdering": [],
        "appliedRules": [],
        "searchId": "fb4f34dec80bcf2be335b6bd0602e7b9",
        "correlationId": "fb4f34dec80bcf2be335b6bd0602e7b9"
    }
}
```

### Catalog

This field type lets you select a [Synerise catalog](/docs/assets/catalogs) and an item from that catalog. The item's data, including the primary key, is included in the response when an object is generated from a record.

#### Field configuration in a schema
1. In **Value type**, select **Single value** or **Multiple values**.  
    For details, see [Single and multiple values](#single-and-multiple-values).
2. From the **Primary key format** dropdown list, define how you will provide the context:  
    - **String** to provide a default static ID of the product which will serve as the context.
    - **Jinjava** to provide a default insert from which the ID will be extracted.  
    The values can be changed per record, but the type (static string or Jinjava) is enforced by the schema.
3. In **Default value**, you can set the default:
   - Catalog ID
   - Primary key value (unique identifier of an item in the catalog)

#### Object generation example

<div class="content-tabs" data-tab-group="tabgrp-1383">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-1383-0" data-tab-group="tabgrp-1383" data-tab-active="true">Request</button><button class="tab-button" data-tab-id="tabgrp-1383-1" data-tab-group="tabgrp-1383">Response</button></div>

<div class="tab-panel" data-tab-id="tabgrp-1383-0" data-tab-group="tabgrp-1383" data-tab-active="true">

If the catalog item ID is inserted with the [`{{ context.keyName }}` insert](/docs/assets/brickworks/brickworks-jinjava-inserts), provide the value for the key:

<pre><code class="language-LANG">"context": {
    "keyName": "sku1234"
}</code></pre>

</div>

<div class="tab-panel" data-tab-id="tabgrp-1383-1" data-tab-group="tabgrp-1383">

In the following example, the catalog item has three properties, including the `itemId` primary key.

<pre><code class="language-json">{
    "itemId": "sku1234",
    "name": "WINDBREAKER ZEPHYR",
    "color": "blue"
}</code></pre>

</div>
</div>
