Creating a schema

A schema acts as a template for creating and organizing records, ensuring consistency and structure across your data sets.

In this article, you will walk through the process of creating a schema (Products) that includes the following fields:

  • the name of the item
  • the ID of the item
  • information about the item
  • recommendations which will return similar items to the defined item
    The details of the item will be provided while creating a record.

This example demonstrates how Synerise objects, specifically a catalog and an AI recommendation, can be utilized within a schema. While creating a record you will specify the item and will be able to preview recommendation results.

Tip: Before creating a schema for your business scenario, we recommend you to become familiar Limits and constraints as it may affect implementation of the scenario.
The example schema configuration
The example schema configuration

Procedure


  1. Go to Data Management icon Data Management > Schemas > New schema.
  2. Select one of the following schema options:
  3. On the pop-up, provide the following data:
    • In Display name, enter Products
      In this field, you must provide the schema name, value in this field is displayed on the list of schemas only (Data Management icon Data Management > Schemas).
    • In API name, the value is pre-filled (products), if you want to change it, provide your own API name variant.
      The value in this field is the unique identifier used to reference this schema in API requests.
    • In Description, describe the schema’s purpose to help workspace users understand its function, for example, Products with Synerise recommendations
      This description will display on the list of schemas only.
  4. Confirm by clicking Apply.

Adding schema fields

In this part of the process, you will add fields to the schema. The schema will contain various field types: strings and Synerise objects (a catalog and AI recommendation based on the similar item model).

This procedure focuses on the configuration of the fields. Later on, you will fill out the schema fields with the actual values, which is described in the Creating a record article.

A blank configuration form of a schema
A blank configuration form of a schema; that's how the starting point for creating schema looks like

Field with the product name

Add the string field which will contain the product name.

  1. Click Add new field.
  2. From the dropdown list, select String.
  3. Fill out the following fields:
    • Display name, enter the title of the field (Product name) which will display in the record.
    • Description, optionally provide a purpose of the field to help other workspace coworkers understand the purpose of the field.
  4. Select Required field checkbox.
  5. Confirm by clicking Apply.

Field with the product ID

Add the string field which will contain the product identifier.

  1. Click Add new field.
  2. From the dropdown list, select String.
  3. Fill out the following fields:
    • Display name, enter the title of the field (Product ID) which will display in the record.
    • Description, optionally provide a purpose of the field to help other workspace coworkers understand the purpose of the field.
  4. Select the Required field checkbox.
  5. Select Unique value checkbox.
  6. Confirm by clicking Apply.

Field with product information

Add the catalog field - it will let you select a catalog which will be the source of product information.

Important: When creating a catalog, you select a primary key column whose values serve as unique identifiers for the catalog entries. In the catalog field settings, you can specify how to provide primary key value: either statically (by manually entering the value) or dynamically, by using Brickwork Jinjava {{ context }} insert. In the scenario described in this article, we will use a static primary key value.
  1. Click Add new field.
  2. From the dropdown list, select Catalog.
  3. Fill out the following fields:
    • Display name, enter the title of the field (Product details) which will display in the record.
    • Description, optionally provide a purpose of the field to help other workspace coworkers understand the purpose of the field.
  4. From the Catalog dropdown list, select the catalog in which you store item feed.
  5. Confirm by clicking Apply.

Field with recommendations

Add the AI recommendation field and select the AI recommendation campaign whose results will be returned in the record.

Important: Some recommendation models based on which you can create AI recommendation campaigns require item context based on which the results are generated. In the AI recommendation field type settings, you can specify how to provide the item context (item identifier): either manually (by entering the item identifier) or dynamically by using Brickwork Jinjava {{ context }} insert. In the scenario described in this article, we will use a static item context value.
  1. Click Add new field.
  2. From the dropdown list, select Catalog.
  3. Fill out the following fields:
    • Display name, enter the title of the field (Products) which will display in the record.
    • Description, optionally provide a purpose of the field to help other workspace coworkers understand the purpose of the field.
  4. From the Recommendation dropdown list, select the recommendation whose results will be displayed in the record
  5. Confirm by clicking Apply.

Defining schema audience

Defining an audience for a schema ensures that the schema’s structure and data apply meaningfully and securely to the intended group of users.

Note: This part of the process is optional. If skipped, the schema audience defaults to everyone.
  1. Click the Audience & Settings tab.
    Result:

    The Audience & Settings section
    The Audience & Settings section
  2. On the Audience section, click Define.

  3. Choose the schema recipients:

    • Everyone - Everyone you have in Profiles.
    • Segmentations - Profiles in selected segmentations will be schema recipients.
      1. Click Segmentations.
      2. On the pop-up, select the segmentations.
      3. Confirm by clicking Apply.
    • New audience - Create audience by defining the conditions profiles must meet to be recipients of selected schema.
  4. In the Audience section, click Apply.

Reviewing schema settings

In the Audience & Settings tab, you can preview API name and schema description you defined at the beginning of the process. You can only edit the description at this stage.

Saving schema

In the upper-right corner, click Save.

The final configuration of schema
The final configuration of schema

Next steps


As the next step, you will create a record out of the created schema.

Editing schemas

When editing existing schemas, keep the following points in mind:

  • Modifying schema does NOT affect existing records. If the field has a default value, that value will be applied when content is generated from the record.
  • Removing a field from a schema does NOT remove it from existing records; but when content is generated from such a record, that value is ignored.
  • You can’t open and view unpublished records created from a previous version of a schema.
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker