Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In addition, the product listing (the same one) must have in its content an “injection” parameter which provides a JSON string configuration for the injection.

...

Info

In order to set the orange value, put string {{template-injection_listing}} if you don’t have the dynamic expression feature active.

Tip

For your testing, you can also simply copy & paste a minified json of your configuration in the injection field, so you don’t have to configure the injection in BigQuery by yourself.

As here, it is typical that the JSON will not be put as a static string in the injection parameter, but instead will be loaded by Boxalino from Google BigQuery. This will be done with a template resource that Boxalino can configure for you.

...

How to configure the Dynamic Expression & Template Resource

...

Info

This section is to configure the injection from BigQuery, for your test, we recommend to put the json as a minified configuration manually in the injection parameter (instead of writing {{template-injection_listing}} which will be simpler to manage.

The Dynamic Expression of the product listing Block of the narrative can be configured as a Script → Template Resource variable as here:

...

The values to indicate for the Values, type and valuesKey should be confirmed by Boxalino as they depend on the data which is loaded from Google BigQuery, but the values indicated here are the default values and can typically be used.

Injecting Facets

The prior sections indicate how to inject content, but it might also be interesting to inject facets.

In this case, you can reuse the same facet container Layout Block you use for your search and navigation filters, but you need to add one new Facet Layout Block, here is an example:

...

Then you can set the facet container and new facet Layout containers in your narrative as children of the list container after the product block as you would do for content injection, here is an example:

...

Finally, you might wnt to add parameters to your facet (for example to have a different label per facet with a question) as follows:

...

If you follow this pattern to put your main language as a parameter (e.g.: “question”) and sublanguages with _LAN then the system will return the current language automatically in the facet parameters on the main name (so a request in French would here return the facet parameter as “question”: “Quelle couleur…” in case your request language was ‘fr’).

The API response will return in the injected facet block a “bx-facet” parameter with the same structure as the bx-facets you already use for the filters on the left, but only with 1 facet (instead of all of them).

The values which are to be shown to the user has the parameter “show”: true (you can ignore the other ones).

Code Block
{
  "bx-facet": {
      "field": "brand",
      "values": [
          {
              "value": "First brand",
              "hitCount": 18,
              "show": true,
              "order": 0
          }
          ...

Advanced Conditions

Listing Conditions can also support advanced real-time conditions (as part of the “content” field) to implement custom behaviors in the listing injections.

...