Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Content customizations

Personalization

This topic describes how to use Targeted Blocks to deliver personalized experiences.

Vocabulary

Targeted Block

A block that wraps the content targeted for specific customer groups, segments, or cart rules.

Group

(Adobe Commerce Customer Group) assigned to the customer.

Segment

(Adobe Commerce Customer Segment) that applies to the customer.

Cart Rule

(Adobe Commerce Cart Price Rule) that applies to the customer cart.

About Targeted Blocks

You can add Targeted Blocks to a Commerce storefront page. They accept the following parameters:

ParameterDescription
Customer GroupsComma-separated list of customer group IDs that determine which customers can view the block.
Customer SegmentsComma-separated list of customer segment IDs that determine which customers can view the block.
Cart RulesComma-separated list of cart rule IDs that determine which customers can view the block.
FragmentThe path to the fragment containing the content.
TypeThe type of block to use for the fallback chain creation. Only the first block that satisfies the conditions of each type is displayed.

If the fragment is not used for a Targeted Block, the last merged row of the block configuration must contain the content.

Specific customer segments

Specify the comma-separated list of customer segment IDs from Adobe Commerce to ensure that the block displays for customers matching these segments only.

The content of the Targeted Block in the following example will be displayed to the customers of the 1st and 2nd segments only:

Targeted Block for specific customer segments
Targeted Block for specific customer segments

Load interactive content from a fragment

Instead of embedding content directly in the Targeted Block, you can specify a path to a fragment. When you use a fragment, the system loads the content from the specified document path and displays it as the Targeted Block content.

The content of the Targeted Block in the following example will be loaded from a document following the path specified in the fragment property:

Targeted Block loading interactive content from a fragment
Targeted Block loading interactive content from a fragment

Fallback using block type

When multiple Targeted Blocks on a page share the same type, only the first matching Targeted Block displays to the customer. This fallback behavior enables you to configure a Targeted Block with default content that is visible to everyone, which specific blocks for particular groups or segments can then replace.

In this example, the first Targeted Block displays only to customers whose shopping cart meets the conditions of cart price rule ID 5. The second Targeted Block has no conditions and should display to all customers. However, because both blocks share the same “Type” value, the second block will not display when the first block is active. Blocks with the same type replace each other in the display hierarchy:

Targeted Block fallback using block type
Targeted Block fallback using block type

Next steps

Now that you understand how to create Targeted Blocks, you can start experimenting with personalized content for your customers.