FECL stands for Frontastic Entity Criterion Language. It's a way to create specific pages that will be shown to customers if that page meets the criteria given.
For example, you can create a Product Details Page (PDP) that will only show if a product is from a certain category.
Using FECL is still experimental so use at your own risk. There's no error handling so you'll need to check your live sites to know that it's working as expected
As FECL is an experimental feature, it's not automatically enabled for all projects. If you'd like to have it enabled for your project, contact our Support team using the Submit a ticket button at the top of the page.
Within Dynamic pages in the Frontastic studio, you can set up rules for certain dynamic page types (Product Details Pages, Category pages, and Content pages).
If you see the below in the Dynamic page rules header, then you add a version with FECL.
You can add a rule-based page for a single product/content/category:
Or select Entity Criterion to input rules based on products/categories/content that fit that ruleset:
Some examples could be:
price > 500 and label = "sale"
type = "makeup"
contentTypeId = "Partner"
If something matches more than 1 rule, drag the rule you want to be shown first to the top of the list. See the using dynamic pages article for more information.
FECL supports simple conditions that the logical operators can combine:
To achieve more complex conditions. Supported operators are:
You can and should use braces to indicate precedence of evaluation.
A complete example of a complex rule could be:
(category.categoryId = "2074" or category.categoryId = "3392")
There's currently no way to express “any element of a list” or “all elements of a list” expressions. So it's not possible to work with arrays of values in FECL. The workaround for such conditions is to pre-calculate a resulting property in the matching payload to make it available directly in FECL.
You can also use the FECL criteria to schedule different page versions to be live at the same time.
Say you have 1 project and within that project, you have multiple locales. You don't always want the same page version live for each locale. So you can set up a different page version and input a criterion so it displays 2 different live versions.
See the scheduling page versions for different locales article for more information.
Updated over 1 year ago