How to create a static Narrative

Introduction

Narratives are meant to be made highly dynamic, however, before making your Narrative dynamic, it is recommended to do a static Narrative first and to test that it works and is rendered visually correctly in your front-end.

We recommend you to start with a document with the designed of mock-up layouts you want to do and to indicate in this document what are the Layout Blocks (for example by drawing boxes around) and indicating the name of the layout block every time, as a result, you will have a layout like below, then you can directly indicates what should be the possible configuration parameters of each block. This will be a great Specification Document for the Integration Team!

Before you can start configuring your Narratives, you need first to declare all your Layout Blocks, please check the information here : How to declare your Narrative Layout Blocks

For example, if you want to create a Narrative with this layout, you will need to define 4 Layout Blocks:

  1. Title

  2. Banner

  3. Product Slider

  4. Product

 

You can create exactly such a Layout as a static Narrative with dummy test content. This way, you can fully test your front-end and adjust it as you want. When you are finished, you can then modify your Narrative to become dynamic.

We recommend you to keep a static narrative copy, so you can easily make modifications in the future, without having to work with a more complex dynamically configured narrative. You can do that by having your static narrative connected to another widget you use only for testing or by connecting to the same widget, but adding a context (for example: checking the value of a request parameter) so that the static narrative is used when this parameter is set in your API request.

Step 1: Create your Narrative WPO Widget

Every Narrative is connected to a WPO widget. This way, when you make your call to the Boxalino Narrative API you can indicate the widget you would like to retrieve your Narrative from.

You can create a widget without any special strategy simply by following the guide : How to add a new WPO Widget

As you will create a widget for a Narrative, make sure to select one of the 3rd line WPO : PRESENT, TELL OR PERSUADE as described in the How the above How to link.

Step 2: Configure your Narrative with a Fix Layout

Now that you have created your widget, you can create your Narrative:

First, go to the Marketing > Narrative menu and click on the top-left button “+ Add” to add a narrative.

Give a name to your narrative (all small caps, no special characters except _ ).

Then click on the pencil to edit it and do the following:

  1. Define a Title in every language (optional, not needed if the Narrative doesn’t affect the page title)

  2. Define other SEO content in the SEO Tab (optional, not needed if the Narrative doesn’t affect those)

  3. Add a Fix Layout with the “+ Add” button.

After adding a Fix Layout, you need to add each Layout Block in the order you want. following the example, the first is title:

to the last which is product slider:

For each of the element in the list, you need to provide some sample (dummy) values of each parameters, like here for the title:

And for the case of the product slider (which is the same for any block which has the property “bx-hits” and is a container of products (see How to declare your Narrative Layout Blocks for details), there need to be one Sub-Content Element with the Layout Block “product”:

Step 3: Deploy your Narrative in Test (or publish it)

Now that you have configured your static Narrative, you can deploy it in test mode with the button “Test” on the top right:

Please refer to the logic defined in Sep 3 : Publish Your Configuration of How to add a new WPO Widget to decide if you need to publish your account (and if needed to do it).