AD0-E725 practice question 6 of 10
A client wants to calculate tax differently when an order is billed for a range of particular postcodes. They want to implement their own system instead of using a third-party system. The Developer is asked to assist in this task by creating a conditional webhook. What must be done to achieve this?
Full set: 50 questionsThe standard and most efficient method to create a conditional webhook in Adobe Commerce is by using the declarative webhooks.xml configuration file. This file allows developers to define rules that filter events based on the payload data. By adding a block, a developer can specify a condition on the billingaddress.postcode field. The regexp (regular expression) operator is the appropriate choice for matching a range or pattern of postcodes, ensuring the webhook only triggers for the specified criteria.
A. A plugin would intercept the webhook processing logic, which is less efficient than declarative filtering. The goal is to prevent the webhook from triggering at all, not to alter its behavior during processing.
C. This describes a non-standard and overly complex approach. There is no native concept of "linking" webhooks, and this method does not address the core requirement of how to make the new webhook conditional.
1. Adobe Commerce Developer Documentation
Configure webhooks:
Section: Conditional webhooks
Content: "You can configure a webhook to be sent only when certain conditions are met. The conditions are defined in the element of the webhooks.xml file. Each element contains a field
operator
and value." This section explicitly details the use of the element to create conditional webhooks.
URL: https://developer.adobe.com/commerce/webapi/rest/webhooks/configure/
2. Adobe Commerce Developer Documentation
webhooks.xml reference:
Section: element
Content: This reference page lists the available operators for the element
which include eq
neq
gt
lt
in
nin
and regexp. The regexp operator is specified for matching values against a regular expression
which is ideal for the postcode range requirement.
URL: https://developer.adobe.com/commerce/webapi/rest/webhooks/webhooks-xml-reference/
Keep practicing
Take the free AD0-E725 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other AD0-E725 practice questions
- Question 1A Developer working on an Adobe Commerce Cloud project encounters an issue with the datab…
- Question 2A Developer is tasked with creating a new index. The custom indexer is not automatically …
- Question 3An Adobe Commerce Developer is approached to disable several cron jobs from a customizati…
- Question 4An Adobe Commerce Developer is tasked to frequently send data to a third-party API. The A…
- Question 5A Developer creates daily cron jobs to automate a client’s business processes, including …
- Question 7A client requests changes to their Pro Staging and Production environments. They supply a…
