AD0-E722 practice question 7 of 10

A merchant is using a unified website that supports native Adobe Commerce B2B and B2C with a single store view. The merchant's objective is to…

Full set: 50 questions
A merchant is using a unified website that supports native Adobe Commerce B2B and B2C with a single store view. The merchant's objective is to display the B2B account features, such as negotiable quotes and credit limits, in the header of the site on every page for logged-in users who belong to a B2B company account. Each B2B company possesses its unique shared catalog and customer group, while numerous customer groups for non-B2B customers undergo changes. The merchant insists that this association should not be linked to customer groups. Which two solutions should the Architect recommend for consideration, taking into account public data and caching? (Choose two.)
Answer options
A: Create a Virtual Type that switches the theme when a user is part of a B2B company so the output can be modified accordingly in the alternate theme.
B: Create a new HTTP Context variable to allow for separate public content to be cached for users in B2B companies where the output can be modified accordingly. Correct answer
C: Set whether the current user is part of a B2B company in the customer session and use that data directly to modify the output accordingly.
D: Create a new custom condition for customer segments that allow for choosing whether a user is part of a B2B company and then use this segment to modify the output accordingly. Correct answer
E: Check if the current user is part of a B2B company within a block class and modify the output accordingly.
Correct Answer:
B. Create a new HTTP Context variable to allow for separate public content to be cached for users in B2B companies where the output can be modified accordingly.; D. Create a new custom condition for customer segments that allow for choosing whether a user is part of a B2B company and then use this segment to modify the output accordingly.
Explanation

The core challenge is to vary content within a globally cached block (the header) based on user type (B2B vs. B2C) without degrading performance. Option (B) is the direct, low-level solution. Creating a custom HTTP Context variable allows the full-page cache (Varnish) to store and serve distinct cached versions of the page for B2B and non-B2B users. This is the standard, performant architectural pattern for cache variation in Adobe Commerce. Option (D) provides a higher-level, feature-driven solution. Customer Segments are designed for personalization and are integrated with the full-page cache. A custom segment condition can identify B2B users without relying on customer groups, enabling the display of targeted content in a cache-friendly manner.

Why Incorrect

A. Switching the entire theme is architecturally excessive and inefficient for a minor header modification.
C. Using session data directly in a block requires disabling caching for that block, causing significant performance degradation on every page.
E. Checking user status directly within the block class forces the block to be uncacheable ("hole-punched"), which severely harms site-wide performance.

References

1. Adobe Commerce Developer Documentation - Content variation: This document explicitly details the use of HTTP context variables to serve different cached content. It states, "The value of this variable is used to create a separate cache variation for each different value." This directly supports option B as the correct mechanism for cache-aware content variation.

Source: Adobe Commerce Developer Documentation, Frontend Developer Guide > Varnish > Content variation.

2. Adobe Commerce Developer Documentation - Private content: This page explains the concept of "hole punching" and why it should be avoided for performance reasons. It clarifies that blocks accessing session data or other private information must be marked uncacheable, which validates why options C and E are incorrect.

Source: Adobe Commerce Developer Documentation, Frontend Developer Guide > Layout > Private content.

3. Adobe Commerce User Guide - Customer Segments: This guide describes how Customer Segments enable the display of dynamic content to specific customers. It notes that segment information is used by the full-page cache to serve the correct content, confirming that segments are a cache-aware solution, which supports option D.

Source: Adobe Commerce User Guide, Chapter: Customers > Customer Segments.

Scroll to Top