Skip to main content

AD0-E716 Adobe Commerce Developer with Cloud Add-on

  • Adobe
  • 5 free sample questions

About this exam

AD0-E716 is the Adobe exam Adobe Commerce Developer with Cloud Add-on. Paid practice material for this exam is not available yet, but you can try its free sample questions.

Exam code
AD0-E716
Vendor
Adobe
Practice questions
Not available yet
Free sample questions
5
Question bank last updated
Not available yet

Try 2 sample questions

Taken from the free sample set for AD0-E716.

Question 1 (choose 2)

A developer is working on an Adobe Commerce Cloud project and wants to get connection data for the environment ' s deployed services. The developer has all of the necessary permissions to do this.

Which two options would the developer take to get the connection credentials? (Choose Two.)

  1. Option A:

    Run the magento-cloud relationships CLI Command.

  2. Option B:

    Get the data from the Project Web Interface dedicated section.

  3. Option C:

    Execute ece-tools env:config:show services Command.

  4. Option D:

    Connect to server via SSH and read $_ENV[ ' services ' ] variable.

Show answer and explanation

Correct answer: A, B

In Adobe Commerce Cloud, connection data for deployed services (such as databases, caches, and other services) can be retrieved using different methods depending on the developer’s access and the tools available.

    Using magento-cloud relationships Command :

      This CLI command retrieves the connection credentials for the services associated with the environment, such as database and Redis, directly from the command line.

    Project Web Interface :

      The Project Web Interface provides a dedicated section where developers can access service connection details, making it convenient for those who prefer a graphical interface.

    Why Options A and B are Correct :

      Both methods are valid and frequently used for accessing connection information. Option C, ece-tools env:config:show services, does not exist. Option D, reading $_ENV[ ' services ' ], would require SSH access and does not provide direct connection details in a user-friendly format.

    References :

      Adobe Commerce documentation on Accessing Services

Question 2 (choose 1)

An Adobe Commerce developer is tasked with adding custom data to orders fetched from the API. While keeping best practices in mind, how would the developer achieve this?

  1. Option A:

    Create an extension attribute on Nagento\sales\Api\E)ata\orderinterface and an after plugin on

    Magento\Sales\Model\Order: :getExtensionAttributes() to add the custom data.

  2. Option B:

    Create an extension attribute On Magento\Sales\Api\Data\OrderInterface and an after plugin On Magento\Sales\Api\OrderRepositoryInterface On geto and getListo to add the custom data.

  3. Option C:

    Create a before plugin on Magento\sales\model\ResourceModel\order\collection: :load and alter the query to fetch the additional data. Data will then be automatically added to the items fetched from the API.

Show answer and explanation

Correct answer: B

The developer should create an extension attribute on the Magento\Sales\Api\Data\OrderInterface interface and an after plugin on the Magento\Sales\Api\OrderRepositoryInterface::get() and Magento\Sales\Api\OrderRepositoryInterface::getList() methods.

The extension attribute will store the custom data. The after plugin will be used to add the custom data to the order object when it is fetched from the API.

Here is the code for the extension attribute and after plugin:

PHP

namespace MyVendor\MyModule\Api\Data;

interface OrderExtensionInterface extends \Magento\Sales\Api\Data\OrderInterface

{

/**

* Get custom data.

*

* @return string|null

*/

public function getCustomData();

/**

* Set custom data.

*

* @param string $customData

* @return $this

*/

public function setCustomData($customData);

}

namespace MyVendor\MyModule\Model;

class OrderRepository extends \Magento\Sales\Api\OrderRepositoryInterface

{

/**

* After get order.

*

* @param \Magento\Sales\Api\OrderRepositoryInterface $subject

* @param \Magento\Sales\Api\Data\OrderInterface $order

* @return \Magento\Sales\Api\Data\OrderInterface

*/

public function afterGetOrder($subject, $order)

{

if ($order instanceof OrderExtensionInterface) {

$order- > setCustomData( ' This is custom data ' );

}

return $order;

}

/**

* After get list.

*

* @param \Magento\Sales\Api\OrderRepositoryInterface $subject

* @param \Magento\Sales\Api\Data\OrderInterface[] $orders

* @return \Magento\Sales\Api\Data\OrderInterface[]

*/

public function afterGetList($subject, $orders)

{

foreach ($orders as $order) {

if ($order instanceof OrderExtensionInterface) {

$order- > setCustomData( ' This is custom data ' );

}

}

return $orders;

}

}

Once the extension attribute and after plugin are created, the custom data will be added to orders fetched from the API.

See all 5 free sample questions