
Creating a [record](/docs/assets/brickworks/core-concepts#record) means adding the data to the [schema](/docs/assets/brickworks/core-concepts#schema). Practically, it means that you fill out [schema fields](/docs/assets/brickworks/schema-field-types). A group of such schema [records](/docs/assets/brickworks/core-concepts#record) forms a data collection and after saving, you can find them in <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/data-modeling-hub-icon.svg" alt="Data Modeling Hub icon" class="icon">  **Data Modeling Hub > Data collections** for a particular schema.  

This article explains how to create a record in the Synerise platform. The scope of the article includes instructions on: 

1. [Creating a record](#creating-records). 
    1. Selecting a schema to which the record will be added.
    2. Filling out the configuration form based on the selected schema.   
2. [Saving](#saving-as-a-draft) or [publishing the record](#publishing-options).
2. [Previewing record results](#previewing-records). 

## Important notes
---
Before creating a record, see [Record usage guidelines](/docs/assets/brickworks/quick-start#record-usage-guidelines).




## Creating records
---

In this part of the process, you will add a record to the schema output as explained in the [Creating a schema](/docs/assets/brickworks/quick-start/creating-a-schema) article.

### Procedure

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/data-modeling-hub-icon.svg" alt="Data Modeling Hub icon" class="icon"> **Data Modeling Hub > Data collections**.  
2. In the header, from **Select schema** dropdown list, select the **Products** schema created according to the instructions in the [Creating a schema](/docs/assets/brickworks/quick-start/creating-a-schema).  
3. In the upper-right corner, click **New record**.  
    **Result**: A configuration form opens. 
   
    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/_gfx/brickworks-record-simple-schema.png" class="medium" alt="A record made on the basis of schema described in the Creating a schema article"><figcaption>A view of a record made on the basis of the schema described in the Creating a schema article - simple schema variant</figcaption></figure>

1. In **Slug**, enter a URL-friendly, human-readable string, used to uniquely identify a record. Slug is used as a record identifier when generating objects based on the record.  
    A slug can only contain letters (uppercase or lowercase), digits, underscores, or hyphens; however, it cannot begin with an underscore and must contain at least one character.
2. Fill out the schema fields:  
    1. In **Product name**, provide the name of the product based on which the similar recommendations will be returned.  
    2. In **Product ID**, provide the product identifier of the product.  
    3. In **Primary key**, provide the ID of the product (the same as in the previous step).
    4. In **Product context**, provide the ID of the product (the same as in the previous step). 


## Saving as a draft
---
*This option is only available for records in managed schemas*.

If you want to save your progress, you can save it as a draft. Draft records remain private and will not be visible publicly. Additionally, attempting to generate an object based on the record’s slug while it is a draft will result in an error. 

To save a record as a draft, in the upper right corner, click **Save as draft**. The record will be saved in <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/data-modeling-hub-icon.svg" alt="Data Modeling Hub icon" class="icon">  **Data Modeling Hub > Data collections** for the **Products** schema.

## Previewing records
---

You can preview the record in context of a selected user.

If your records include dynamic values, they will not be rendered until you select a customer for whom the preview will be generated.  


1. In <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/data-modeling-hub-icon.svg" alt="Data Modeling Hub icon" class="icon"> **Data Modeling Hub > Data collections**. 
2. In the header, from **Select schema** dropdown list, select the **Products** schema.
3. Find the record which you want to preview.
4. Enter the record configuration.
5. Click **Preview**.
6. Click **Preview contexts**.  
7. From the dropdown list, find a profile for which you want to generate a record preview.    
    **Result**:  
    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/_gfx/brickworks-record-preview.png" class="medium" alt="Record results for an example profile"><figcaption>Record results for an example profile</figcaption></figure>
    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/_gfx/brickworks-record-preview2.png" class="medium" alt="Record results for an example profile"><figcaption>Further part of the record results for an example profile</figcaption></figure>

### Additional preview context parameters

If your schema record contains a [`{{ context.keyName }}` Brickwork insert](/docs/assets/brickworks/brickworks-jinjava-inserts#retrieving-context), you can set the exact value for this field by adding the key (using the actual parameter name instead of .myField) and its value in the **Additional context parameter** section. This helps provide context for non-profile attributes (like an item identifier) in the preview.

<figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/assets/_gfx/brickworks-additional-context.png" class="medium" alt="Defining additional context parameters for preview" ><figcaption>Defining additional context parameters for preview</figcaption></figure>

1. The [Jinjava code field](/docs/assets/brickworks/schema-field-types#jinjava-code)  (**Product ID**) contains `{{ context.itemId }}`.
2. In the preview settings, the additional context parameters are set as follows:  
    `itemId: 0000208295260`
3. In the record results preview `{{ context.itemId }}` is replaced with `0000208295260`

## Publishing options

### Scheduling publication
---

This option lets you delay publishing the record and/or schedule publication within specific time windows (for example, daily between 1 and 4 P.M. over a two-week period).

1. Click the **Settings** tab.  
2. On the **Schedule** section, click **Define**.  
3. Select one of the following tabs:
    - **Run immediately** - to publish the record immediately without the end date.
    - **Scheduled** - to publish the record at the defined date with the expiration date. In the configuration, in **Start date** and **End date**, specify the beginning and end of the period during which the record will be published.
2. From the **Timezone** dropdown list, select the timezone according to which the schedule calendar will apply.
4. If you want to set the time windows in which the record will be in the published status, enable the **Set time windows** option.  
5. Use **Daily**, **Weekly**, and **Monthly** tabs to define the frequency of publishing the record.  
6. After selecting a tab, define the time window by choosing the start time on the left and the end time on the right. Click the clock icon to select the time.  
    The record status outside the defined time window has the scheduled status. 
7. Confirm by clicking **Apply**.  
    **Result**: The publication of the record is scheduled.


### Publishing immediately
---

This option lets you immediately publish the record. Optionally, you can publish the record within specific time windows (for example, daily between 1 and 4 P.M. over a two-week period).

1. Click the **Run immediately** tab.  
4. If you want to set the time windows in which the record will be in the published status, enable the **Set time windows** option.  
5. Use **Daily**, **Weekly**, and **Monthly** tabs to define the frequency of publishing the record.  
6. After selecting a tab, define the time window by choosing the start time on the left and the end time on the right. Click the clock icon to select the time.  
    The record status outside the defined time window has the scheduled status. 
7. Confirm by clicking **Apply**.  





## Next steps
---
As the next step, proceed to [generating an object](/docs/assets/brickworks/generating-objects) with record results in a distribution channel of your choice.  


