Promotion Document Type

Introduction

Goal

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

Prerequisites

Before starting:

👍

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:

724724

Create the Promotions Document Type

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

251251

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

459459

In the New document type dialog, enter "Promotion" in the Name field, choose the 1 Column layout, and click OK.

495495

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
DateexpirydateExpiry Date
12801280

Click Done to save the document type.

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.

444444 481481

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)
12791279

👍

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.

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


Did this page help you?