Blueprint Developer Manual / Version 2512.1
Table Of ContentsA variant specifies the conditions under which it can be shown. A condition can indicate the membership of the accessing user in a certain user segment or the assignment of the accessing user to a test case. You can specify multiple segments for a single variant; the variant becomes active as soon as the user is in at least one of the segments or in the test case.
Conditions are stored in a struct property
variantCondition. A variant stores them either as
strings or, alternatively, as links to content items that represent the
conditions. Condition strings follow a URI-style format
,
for example
VENDOR:VENDORSPECIFICcmec:///p13n/segment/3239470C3C68260C33E4;cmecType=segment
for the Engagement Cloud integration. The struct can contain either a
list of segments in the property segments or an A/B
test in the property abTestCase. If you provide an
A/B test case, you must also store the test control in the property
abTestControl of the struct, and the test itself in
the ordinary string property variantAbTest.
Sometimes you must represent conditions using dedicated content items
instead of strings. This matters particularly if you must manage the set
of available conditions in the CMS and cannot retrieve it from the
variant provider easily. In such a case, link
properties replace the string properties mentioned above. To convert
these links from condition content items to condition strings, provide a
strategy bean implementing the interface
ContentVariantPropertyLinkTranslator in
the Spring application context. The strategy bean defines the content
type of the condition content items it can handle.
Note
A variant cannot specify a complex boolean condition based on segments or test cases. If you need more complex conditions, define them at the condition provider, typically CoreMedia Engagement Cloud.


