close

Filter

loading table of contents...

Headless Server Developer Manual / Version 2512.1

Table Of Contents

4.10.10 Querying Personalized Variants

The Headless Server allows you to retrieve information about variants. To this end, each content object defines a field contentVariants that contains a list of possible variants, if any. Each variant has a field content for the variant defining the content and a field conditionStrings for the conditions that need to apply for the variant to become active. A field conditions provides access to parsed forms of the conditions. For each variant's content, you can either query further fields directly or you can make follow-up requests. The latter approach is particularly relevant if a single-page application accesses the Headless Server directly, allowing you to check the conditions first and retrieve only those content items that are actually needed. However, the increased number of round trips can outweigh the benefits of a reduced size of the initial response.

During delivery, the first variant for which at least one condition is active is used. If no variant with an active condition can be found, the baseline is used. As a special case, the list of variants contains variants that define only conditions, but no content. These are test control variants that allow you to track a test event. For rendering, these variants should be replaced by the next variant with an active condition and a defined content.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.