Adobe AD0-E722 Adobe Commerce Architect Master Exam Practice Test

Page: 1 / 14
Total 50 questions
Question 1

An Adobe Commerce Architect needs to ensure zero downtime during the deployment process of Adobe Commerce on-premises. Which two steps should the Architect follow? (Choose two.)



Answer : A, C

Option A is correct because enabling the config flag under deployment/blue_green/enabled is one of the steps to ensure zero downtime during the deployment process of Magento 2 on-premises. This flag enables the blue-green deployment feature, which allows deploying a new version of the Magento application to a separate environment (blue) without affecting the current live environment (green).Once the new version is ready, the traffic can be switched from green to blue with minimal or no downtime1.

Option C is correct because running bin/magento setup:upgrade --keep-generated is another step to ensure zero downtime during the deployment process of Magento 2 on-premises. This command updates the database schema and data without deleting the generated code and static view files.This way, the Magento application can still serve requests from the cache while the database is being upgraded2.

Option B is incorrect because running bin/magento setup:upgrade --dry-run=true does not upgrade the database, but only checks if there are any errors or conflicts in the database schema or data.This command can be used for testing purposes, but it does not affect the deployment process or the downtime3.

Option D is incorrect because there is no such option as --convert-old-scripts-true for the bin/magento setup:upgrade command. This option does not exist in Magento 2 and does not have any effect on the deployment process or the downtime.

Option E is incorrect because there is no such config flag as developer/zero_down_time/enabled in Magento 2. This flag does not exist in Magento 2 and does not have any effect on the deployment process or the downtime.


1: Blue-green deployment | Adobe Commerce Developer Guide

2: Deploy Magento to production | Adobe Commerce Developer Guide

3: Command-line installation options | Adobe Commerce Developer Guide

Question 2

An external system integrates functionality of a product catalog search using Adobe Commerce GraphQL API. The Architect creates a new attribute my_attribute in the admin panel with frontend type select-Later, the Architect sees that Productlnterf ace already has the field my_attribute, but returns an Int value. The Architect wants this field to be a new type that contains both option id and label.

To meet this requirement, an Adobe Commerce Architect creates a new module and file etc/schema.graphqls that declares as follows:

After calling command setup:upgrade, the introspection of Productlnterface field my_attribute remains Int. What prevented the value type of field my_attribute from changing?



Answer : C

According to the Adobe Commerce documentation, to extend an existing GraphQL interface, the keyword extend must be used before the interface name. This indicates that the new declaration is adding or modifying fields to the existing interface, rather than redefining it. If the keyword extend is omitted, the new declaration will be ignored and the original interface will be used. In this case, the Architect wants to change the type of the my_attribute field in the ProductInterface interface, which is already declared in the Magento.CatalogGraphQl module. Therefore, the Architect should use the keyword extend before declaring the ProductInterface interface in the schema.graphqls file of the custom module. This will allow the Architect to override the type of the my_attribute field from Int to MyAttributeType.


Extend existing schema | Adobe Commerce Developer Guide

Schema language with GraphQL | Adobe Commerce

Question 3

An Adobe Commerce Architect needs to scope a bespoke news section for a merchants Adobe Commerce storefront. The merchant's SEO agency requests that the following URL structure:

news/{date}/{article_url_key}, where {date} is the publication date of the article, and {article_url_key} is the URL key of the article.

The Architect scopes that a news entity type will be created. The date and URL key data will be stored against each record and autogenerated on save. The values will be able to be manually overridden.



Answer : B, C

These two options are both valid ways to manage routing for the bespoke news section and adhere to best practice. Option B leverages the existing URL rewrite functionality of Adobe Commerce, which allows creating custom URLs for any entity type and storing them in the database. This option requires creating a standard controller route for the news entity type, such as news/article/view/id/i, where i is the news article ID. Then, on saving each news article, a rewrite rule is generated that maps the internal URL to the desired SEO-friendly URL, such as news/{date}/{article_url_key}. The rewrite rule is stored in the url_rewrite table, which is used by the standard router to match and redirect requests.

Option C involves creating a custom router class that implements \Magento\Framework\App\RouterInterface and runs before the standard router in the routing process. The custom router class can match the news portion of the URL and extract the date and URL key parts from it. Then, it can look for and load a news article that matches those values using a model or repository class. If a match is found, it can set the request parameters accordingly and dispatch the request to a controller action that renders the news article page.


Routing | Adobe Commerce Developer Guide

URL Rewrites | Adobe Commerce Developer Guide

Custom Router | Adobe Commerce Developer Guide

Question 4

An Adobe Commerce Architect is planning to create a new action that will add gift registry items to the customer's quote. What should the Architect do to guarantee that private content blocks are updated?



Answer : C

Private content blocks are sections of the page that are specific to each customer and are not cached by the server. To update these blocks when a customer performs an action, such as adding a gift registry item to the quote, the Adobe Commerce Architect needs to specify the new action in a sections.xml configuration file. This file defines which blocks need to be updated for each action and how often they should be updated. By doing this, the Architect can ensure that the private content blocks are refreshed with the latest data from the server.Reference:

Private content | Magento 2 Developer Documentation

Configure private content | Magento 2 Developer Documentation


Question 5

An Adobe Commerce Architect is investigating a case where some EAV product attributes are no longer updated.

* The catalog is composed of 20.000 products with 100 attributes each.

* The product updates are run by recurring Adobe commerce imports that happen multiple times a day.

* The Architect finds an error in the logs that indicates an integrity constraint while trying to insert row with id 2147483647.

What is causing this error?



Answer : C

EAV attribute import uses the REPLACE statement, which deletes and inserts a new row with the same primary key value. This causes the auto-increment column to increase by one for each row, even if the row already exists. If the auto-increment column reaches its maximum value, which is 2147483647 for a signed INT, then any further REPLACE statement will fail with an integrity constraint violation error.Reference:

EAV and extension attributes | Magento 2 Developer Documentation

GitHub - techdivision/import-attribute: This library provides the functionality for the Magento 2 import of EAV attributes

Data integrity in JSON (B) when replacing EAV - Stack Overflow


Question 6

An existing Adobe Commerce website is moving to a headless implementation.

The existing website features an "All Brands'' page, as well as individual pages for each brand. All brand-related pages are cached in Varnish using tags in the same manner as products and categories.

Two new GraphQL queries have been created to make this information available to the frontend for the new headless implementation:

During testing, the queries sometimes return out-of-date information. How should this problem be solved while maintaining performance?



Answer : B

This solution ensures that the data returned by the GraphQL queries is up to date, while also maintaining performance. By specifying a $cache(cacheidentity: Path\To\identityclass) directive for each GraphQL query, the relevant brands and associated products will be added as cache tags.


Question 7

An Adobe Commerce Architect needs to customize the workflow of a monthly installments payment extension. The extension is from a partner who is contracted with the default website Payment Service Provider (PSP), which has its own legacy extension (a module using deprecated payment method).

The installment payment partner manages only initializing a payment, and then hands the capture to be executed by the PSP Once the amount is successfully captured, the PSP notifies the website through a webhook. The goal of the webhook is only to create an "invoice" and save the "capture information" to be used later for refund requests through the PSP itself.

The Architect needs the most simple solution to capture the requested behavior.

Which solution should the Architect implement?



Answer : C

Option C is the correct solution because declaring a capture command with type Magento\Payment\Gateway\Command\NullCommand for the payment method command pool in di.xml will prevent the default capture logic from being executed. The NullCommand class is a dummy implementation of the CommandInterface that does nothing.This way, the payment capture will be handled by the PSP webhook, and the invoice will be created accordingly12

Option A is not a correct solution because adding a plugin before the $invoice->capture() and changing its input to prevent the call of the $payment->capture() will require modifying the core Magento code, which is not recommended.Moreover, this solution will affect all payment methods that use the invoice capture logic, not just the monthly installments payment extension3

Option B is not a correct solution because changing the can_capture attribute for the payment method under config.xml to be <can_capture>0</can_capture> will disable the capture functionality for the payment method entirely.This means that the invoice cannot be created or captured, even by the PSP webhook4


1: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/payments-integrations/payment-gateway/gateway-command.html?lang=en2: https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Payment/Gateway/Command/NullCommand.php3: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/customization/best-practices.html?lang=en#do-not-modify-core-code4: https://experienceleague.adobe.com/docs/commerce-cloud-service/user-guide/payments-integrations/payment-gateway/payment-gateway-configuration.html?lang=en#payment-method-configuration

Page:    1 / 14   
Total 50 questions