## Introduction

### Goal

Create a "promotion" document type using the content type editor.

### Prerequisites

Before starting:

  • Read [About Bloomreach Content](🔗)[Development Environment](🔗)[Content Modeling](🔗), and [Development Workflow](🔗).

  • Have the [Content Type Editor reference documentation](🔗) handy.

  • Have the [Content Type Management API reference documentation](🔗) handy if you want to use it instead of the content type editor to create the new type.

  • Have the [Content Management API reference documentation](🔗) handy if you want to use it instead of the content editor to create new documents.

  • Have or create a channel based on the [Reference SPA](🔗) template.

Tip

In the [next tutorial](🔗), you'll create a page component to render current promotions.

## Create a Development Project with Content Type Changes Enabled

[Create a development project](🔗) and make sure to check the _Include content type changes_ checkbox:

724


Add your channel to the project.

## Create the Promotions Document Type

Navigate to the _Content_ app and from the dropdown in the top left, choose _Content_ types:

251


Browse to the "Bloomreach (brxsaas)" namespace folder and from its context menu, choose _New document type_:

459


In the _New document type_ dialog, enter "Promotion" in the _Name_ field, choose the _1 Column_ layout, and click _OK_.

495


A new, blank "Promotion" document type will be opened in the [content type editor](🔗). Add the following fields:

Field TypePathRequiredDefault Caption
StringnameName
TexttextText
StringpromocodePromo code
Dateexpirydate
Expiry Date
1280


Click _Done_ to save the document type.

Alternatively, you may use the [Content Type Management API](🔗)'s [Content Type endpoint](🔗) to create the new type:



Use the following JSON payload:



## Create Promotion Documents

From the dropdown in the top left, choose _Documents_.

Select your channel's root folder and create a subfolder named "promotions".

In the new "promotions" folder, create a new "Promotion" document. Give it a name, for example "Spring Promotion". Make sure to select your development project and the Promotion document type.

444

481


A new empty "Promotion" document will be opened in the document editor.

Enter some content in all the fields, for example:

  • Name: "Spring Promotion"

  • Text: "15% off on all orders!"

  • Promo Code: SPRING15

  • Expiry Date: (choose a date in the near future)

1279


Tip

Note the message at the top of the editor: Project version: 'Promotions' (offline). Because the new document is of a document type under development, it is automatically added to the appropriate development project.

Click _Done_ to save the document.

Alternatively, you may use the [Content Management API](🔗)'s [Document endpoint](🔗) to create the new document:



Use the following JSON payload:



Create a couple more promotion documents. In the [next tutorial](🔗), you'll create a page component to render current promotions.