Welcome to Trilly

Welcome to the documentation for Trilly, the context-aware headless CMS designed to deliver personalized content seamlessly. Whether you're a developer, content creator, or business owner, Trilly empowers you to provide tailored experiences for your audience. This introduction will help you understand how Trilly works, its benefits, and how you can start using it.

Key concepts

Container

Container is a fundamental unit of content. Container by itself however doesn't hold any content by itself. It is stored in variants, and attached to container once requested. Container can have it's own context constraints, in case if higher-level access rules are required. I.e. if every variant of container have content for English customers, there's not need to serve it to non-English ones.

Variant

Specific version of a container, constrained to a particular context. Variant holds the content in a form of set of key-value pairs, where value can be number, string, boolean value, list or a section. The two latter ones allow to nest content.

There is always a default variant, which is served if none of the constraints are met.

Context constraints

Context constraints are a fundamental aspect of Trilly, enabling the delivery of personalized content based on various contextual parameters. These constraints determine both the availability of containers and the selection of specific variants to be served. Constraints are effectively set of key-value pairs describing wheter a container variant should be served.

Context constraint value can be a number or string. Common examples of context constraints are:

  • User segment/role/group
  • User ID
  • Language
  • Location
  • Device type
  • App version

At this moment constraints can be met by value equality, however more methods are planned:

  • Time - constraint variant to before or after some date
  • Numbers - Less than, greater or equal than, etc.
  • Range of numbers
  • Randomness - limit variant if random number meets speficied threshold
  • Geolocation
  • String patterns

Collection

Named group of containers.

Alright, but how does it work and why should I care?

First of all Trilly is a headless CMS, which means it exists to serve content. The idea is however, to serve the right content to the right user based on various contextual parameters. Here is how it works:

Step 1. Organize your content

When you begin using Trilly, your first step is to organize your content within the platform. Login to Trilly dashboard and create collections, containers, and assign content to default variant.

Step 2a. Set up variants and constraints

Once your default content is set up, you might want to create different versions of this content to cater to different audiences or situations. This is done by creating variants. For each variant, you specify the content that differs from the default and set up context constraints. Each variant will then be served to users who meet these specific conditions.

Setp 3a. Set up GenAI variant

If you want to use GenAI to serve content, you can set up AI variant. AI variant is a special variant that is served when no other variant is matched. AI variant is generated by AI based on your content and user data.

After logging in to our content management panel, users can create collections, containers, variants and content. Once contnet is set up, client application must request for a container or container, passing current user context. This can be done directly via REST Api, or using our libraries, if your application is written in TypeScript.

Trilly recieves a request for a container or collection with user context. System checks every container's variant, comparing set constraints with provided context and returns first match every constraint. Variants are sorted from most complex to the least so most speficied match is returned. If collection is request, same action is done for every container in collection.

At the moment context fields are managed by client applications, and Trilly doesn't help with their storage nor management.