Introduction to documents

Documents are objects that allow users to build mobile applications or create single elements to display in the applications. Due to the coherent scheme nomenclature and encoding the content in JSON, the application is able to parse the encoded data and take actions specified in the content.

Documents can recycle data from other documents or retrieve data from various services. There are no restrictions for any component to use documents, provided a component is able to retrieve data through the API and pass it further to present the data in an appropriate format on the interface.

Business benefits


  • Building a presentation layer of a mobile application without the necessity of releasing another version of the application
  • Easy implementation
  • Recycling content created in the Synerise application to develop a coherent marketing communication
  • Preparing documents for specific audiences through Screen view campaigns

Requirements


  • Create schema types for documents through the API.
  • Prepare content you want to use in documents (you can insert promotions, recommendations and other documents).

Exemplary usages


Document wizard

Build separate sections in an application

The following examples present two documents: AI-driven recommendations and a promotion. These documents use the content created in the Synerise application in order to present a collection of products matched to users’ preferences and needs.

These documents can be easily edited in terms of the layout (their order may be swapped) and the content itself can present different sets of promotions or types of recommendations (provided you have created them before).

slug: recommended

{
  "name": "Best offers for You",
  "recommendations": "{% recommendations_json campaignId=XRHP6iVS20SG %} {% endrecommendations_json %}"
}

This is the definition of the document required by Content Widget for Mobile. Later, this definition will be included in the example of another document passed within the main application view.

slug: content-widget

{
  "section-type": "content-widget",
  "background-color": "#ffffff",
  "title": "Best offers for you",
  "action": { 
	"method": "ContentWidget",
        "slug": "recommended"  
}
}
Important: This example involves inserting the AI recommendations that require you to use an HTTP POST method within the schema-service API. However, normally everywhere else you need to use an HTTP GET. The example is based on our own Content Widget for Mobile.

slug: autumn-collection

{
  "section-type": "promotions",
  "section-background-color": "#123123",
  "section-title": "Autumn Collection",
  "action": { 
          "data-schema": "promotions", 
          "uri": "https://api.snrapi.com/schema-service/proxy/promotions?tagNames=autumn-collection"
  }
}

Build an application entirely based on documents

You can use documents in order to create a main panel which acts as a container of other documents managed through the Synerise backend. It can be the first screen users see when they log in to the application.

The main view can take the following structure:

slug: main

{
  "sections": [
    "{% document welcome %}",
    "{% document autumn-collection %}",
    "{% document content-widget %}",
    "{% document club %}",
    "{% document daily-promo %}",
    "{% document promo-api %}",
    "{% document promo-sdk %}"
  ],
  "type": "sections-list"
}
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.