Skip to main content
Skip table of contents

Editing contexts

Overview

XroadMedia provides an application called Piloto that allows you to edit contexts (which allow Ncanto to provide recommendations that are tailored to specific scenarios).

Piloto's Context Editor is a very powerful graphical tool for editing contexts. But it also has a source view that allows you to view and edit the current context in JSON format.

For simplicity, all the examples on this page use JSON. These can be copied and pasted into Piloto's source code view.

Adding a genre filter to a context

You can add a simple filter to an existing context to filter the recommendations it returns by genre.

For example, to add a filter for the horror genre, add this within the global object:

CODE
"filter": {
    "term":"genreBroad", 
    "value": "horror"
}

Adding a channel group filter to a context

Sometimes you will want to filter by channel group. For example, if your channel lineup includes five BBC channels, you might want to display a single section in your application containing recommended catch-up content from all five of these channels.

To do this, you need to add a filter to an existing context for catch-up recommendations. For example, to include only recommendations for the specified BBC channels, add this within the global object:

CODE
"filter": {
    "term":"sourceId", 
    "operator":"in", 
    "values": ["BBC1","BBC2","BBC4","BBCNews","CBBC"]
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.