Skip to main content

Last updated: May 2026

Practice Exam

AP-220Salesforce Order Management Developer Accredited Professional

Test your knowledge with official exam-style questions

Questions25Passing70%Exam time90 min

Questions and options are shuffled each attempt

Order Management Developer Accredited ProfessionalPractice Set 1: All Questions & Explanations

Full question text, answer options, and explanations for this practice set — a spoiler-free alternative is the interactive quiz above for scored, shuffled practice.

  1. 1. Which Salesforce OMS object is automatically created when an order is ingested and serves as the parent record for all fulfillment, payment, and return records?

    • A. Order
    • B. OrderSummary(correct)
    • C. FulfillmentOrder
    • D. WebCart

    Explanation: OrderSummary is the root record created by OMS when an order is ingested. It links to OrderItemSummary (line items), FulfillmentOrder (shipping), PaymentGroup (payments), and ReturnOrder (returns). The source Order record provides the data from which the OrderSummary is derived, but OrderSummary is the OMS system of record.

  2. 2. Which two relationships correctly describe the OMS data model hierarchy for fulfillment? (Choose 2)

    • A. OrderSummary → OrderDeliveryGroup → FulfillmentOrder → FulfillmentOrderLineItem(correct)
    • B. FulfillmentOrder has a lookup to FulfillmentOrderLocation(correct)
    • C. OrderItemSummary has a master-detail relationship with FulfillmentOrder
    • D. PaymentGroup is a child of FulfillmentOrder

    Explanation: The fulfillment hierarchy is: OrderSummary contains OrderDeliveryGroups, which are the basis for FulfillmentOrders, each of which has FulfillmentOrderLineItems. Every FulfillmentOrder has a lookup to FulfillmentOrderLocation (the warehouse or 3PL). PaymentGroup is a child of OrderSummary, not FulfillmentOrder.

  3. 3. A developer queries OrderItemSummary and finds fields like QuantityOrdered, QuantityFulfilled, and QuantityCanceled. Which field represents the quantity that still needs to be fulfilled?

    • A. QuantityAvailableToFulfill(correct)
    • B. QuantityOrdered minus QuantityFulfilled
    • C. QuantityPending
    • D. QuantityOpen

    Explanation: OrderItemSummary includes QuantityAvailableToFulfill, a formula field that represents the remaining quantity not yet fulfilled or cancelled. Developers should use this field rather than computing QuantityOrdered minus QuantityFulfilled manually, as OMS maintains it accurately across partial fulfillments and cancellations.

  4. 4. A developer is setting up an OMS sandbox for development. Which two setup steps are required to enable Order Management in a new Developer sandbox?

    • A. Enable Order Management in Setup > Order Management Settings, then assign the Order Management permission set to users(correct)
    • B. Install the Order Management managed package from AppExchange
    • C. Create a Connected App for the OMS REST API
    • D. Enable Order Management in Setup > Order Management Settings, then configure at least one FulfillmentOrderLocation

    Explanation: Order Management is a native Salesforce feature enabled via Setup > Order Management Settings (no managed package required). After enabling it, users need the 'Salesforce Order Management' permission set to access OMS records and features. FulfillmentOrderLocation is a data configuration step needed before creating FulfillmentOrders, but it is not a prerequisite for enabling OMS.

  5. 5. Which type of Salesforce Flow is used as the primary orchestration mechanism for processing OMS order lifecycle events (e.g., activating orders, creating fulfillment orders, capturing payment)?

    • A. Screen Flow
    • B. Autolaunched Flow (no trigger)
    • C. Autolaunched Flow triggered by a Platform Event or Record-Triggered Flow(correct)
    • D. Scheduled Flow

    Explanation: OMS orchestration flows are autolaunched flows triggered by Platform Events (such as commerce/orders events) or by record-triggered flows on OMS objects. Platform Event-triggered flows are the most common pattern — OMS publishes an event when an order reaches a lifecycle milestone, and the subscribed flow invokes OMS actions (EnsureFundsAsync, CreateFulfillmentOrders, etc.).

  6. 6. A developer needs to add a custom validation step in the OMS order activation flow — orders above $10,000 must be approved by a manager before activation. Where should this logic be added?

    • A. In a before-trigger on the OrderSummary object
    • B. In the OMS orchestration Flow, as a Decision element and an Approval Process action before the activation step(correct)
    • C. In the standard OMS Order Activation Flow provided by Salesforce
    • D. In a validation rule on the OrderSummary object

    Explanation: Custom business logic is added to the OMS orchestration Flow (not the standard Salesforce-provided sample flows, which should be cloned and customised). A Decision element checks TotalAmount > 10000, and if true, an Approval Process subflow or Pause element waits for approval before proceeding to activate the order.

  7. 7. In an OMS Flow, a developer wants to call an external fraud-detection API synchronously before fulfillment order creation. Which Flow element should they use?

    • A. Apex Action (invocable method) that makes an HTTP callout
    • B. External Service action added to the Flow from a registered OpenAPI specification(correct)
    • C. Platform Event Publish element to send data to the external system and wait for a response
    • D. Wait element that pauses the flow until the external API responds

    Explanation: External Services allows a developer to register an OpenAPI (Swagger) specification of the fraud-detection API and call it directly from Flow using the generated action — no Apex required. Alternatively, an Apex Action works if a custom Apex class with @InvocableMethod is available. Both are valid synchronous integration patterns in Flow. Platform Events are asynchronous and do not support synchronous wait-for-response patterns.

  8. 8. The OMS EnsureFundsAsync Flow action is asynchronous. How does the orchestration Flow typically handle the response from EnsureFundsAsync?

    • A. The Flow pauses at a Wait element until a Platform Event carrying the payment result is received(correct)
    • B. The payment result is returned synchronously as the action's output variable in the same Flow execution
    • C. A scheduled job polls the Payment record every minute until it is updated
    • D. A separate record-triggered Flow on the Payment object fires when the gateway updates the Payment status

    Explanation: EnsureFundsAsync is asynchronous — it publishes a request to the payment gateway adapter. The OMS orchestration Flow uses a Wait/Resume element (or a Platform Event trigger) to pause and wait for the Salesforce Payments Platform Event that carries the gateway response. When the event fires, the Flow resumes and evaluates the result.

  9. 9. A developer is building the OMS fulfillment flow. Which two standard OMS Flow actions must be called in the correct sequence to route items from an activated OrderSummary to a warehouse? (Choose 2)

    • A. CreateFulfillmentOrders — creates FulfillmentOrder records from the OrderDeliveryGroups(correct)
    • B. EnsureFundsAsync — captures payment before creating FulfillmentOrders
    • C. SubmitFulfillmentOrder — transitions the FulfillmentOrder to Submitted and notifies the warehouse(correct)
    • D. ActivateOrderSummary — sets the OrderSummary to Active status

    Explanation: The fulfillment routing sequence is: (1) CreateFulfillmentOrders — creates one or more FulfillmentOrder records from OrderDeliveryGroups on the active OrderSummary; (2) SubmitFulfillmentOrder — submits each FulfillmentOrder to the assigned location. EnsureFundsAsync (payment capture) typically runs before or after shipment, not specifically between these two. ActivateOrderSummary activates the order upstream, before fulfillment begins.

  10. 10. A developer needs to handle order cancellations in OMS. When a customer cancels an order that has already been submitted to a warehouse but not yet shipped, which Flow action is used to cancel the FulfillmentOrder?

    • A. CancelFulfillmentOrderItem
    • B. CancelOrderSummary
    • C. CancelFulfillmentOrder (custom Apex) — there is no standard action
    • D. Update the FulfillmentOrder Status to 'Cancelled' using a standard Update Records element(correct)

    Explanation: OMS does not have a dedicated CancelFulfillmentOrder standard Flow action. To cancel a submitted FulfillmentOrder (when the warehouse confirms it can be stopped), the developer updates the FulfillmentOrder Status field to 'Cancelled' using a standard Update Records element in Flow. The developer must also handle inventory restoration and downstream effects (refund, return-to-stock) in the same Flow.

  11. 11. A developer's OMS orchestration Flow fails with a CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY error when calling EnsureFundsAsync. The Flow is triggered by a Platform Event. What is the most likely cause and fix?

    • A. The Apex action inside EnsureFundsAsync makes a DML call inside a callout context — fix by using @future(callout=true)
    • B. EnsureFundsAsync cannot run in a Platform Event-triggered Flow; it must run in a Screen Flow
    • C. A mixed-DML error: the Flow updates a setup object and a non-setup object in the same transaction — fix by separating the operations into subflows
    • D. The PaymentGroup record is locked by another process — fix by adding a delay with a Wait element before the action(correct)

    Explanation: Platform Event-triggered flows run asynchronously but can still encounter record lock conflicts when other processes (e.g., a concurrent Flow or trigger) are updating the same PaymentGroup or Payment records at the same time. Adding a Wait/Resume element or retry logic (via a Pause element or re-queuing) resolves the lock contention. Mixed-DML errors have a different error message pattern.

  12. 12. A developer needs to implement a 'split shipment' rule: if an OrderSummary has items fulfilled from more than one warehouse, notify the customer with the expected ship dates for each shipment. Where in the OMS Flow should this notification be triggered?

    • A. In an after-trigger on FulfillmentOrder when Status changes to 'Submitted'
    • B. After the CreateFulfillmentOrders action, use a Get Records element to count the resulting FulfillmentOrders; if count > 1, invoke a Send Email action or Platform Event to notify the customer(correct)
    • C. In the OrderDeliveryGroup before-trigger, before FulfillmentOrders are created
    • D. In a scheduled Apex job that checks OrderSummary records daily

    Explanation: After CreateFulfillmentOrders runs, the developer retrieves the newly created FulfillmentOrder records with a Get Records element. A Decision element checks if more than one FulfillmentOrder was created. If true, a Send Email or Custom Notification action (or Platform Event) informs the customer of the split shipment and expected dates per FulfillmentOrder. This keeps the logic in the OMS Flow rather than adding triggers.

  13. 13. Which OMS REST API endpoint is used to ingest an order from an external system and create an OrderSummary in Salesforce?

    • A. POST /services/data/vXX.0/sobjects/OrderSummary/
    • B. POST /services/data/vXX.0/commerce/orders/actions/create(correct)
    • C. POST /services/data/vXX.0/process/orders
    • D. PUT /services/data/vXX.0/commerce/orders/{orderId}

    Explanation: The standard OMS order ingestion endpoint is POST /services/data/vXX.0/commerce/orders/actions/create. It accepts an order payload (including line items, addresses, payment info) and triggers OMS business logic to create the OrderSummary and related records. Direct sobject inserts on OrderSummary bypass OMS validation and are not supported.

  14. 14. An external system needs to query OMS data, including OrderSummary, FulfillmentOrder, and ReturnOrder records for a specific customer. Which Salesforce API is most appropriate for real-time querying of OMS objects?

    • A. Bulk API 2.0
    • B. SOAP API with a SOQL query
    • C. REST API with SOQL via the /query endpoint(correct)
    • D. Streaming API with PushTopics

    Explanation: The Salesforce REST API /query endpoint (GET /services/data/vXX.0/query?q=SELECT...) supports real-time SOQL queries on OMS objects including OrderSummary, FulfillmentOrder, and ReturnOrder. This is the standard and most flexible approach for external systems querying Salesforce OMS data synchronously.

  15. 15. A developer wants to receive real-time notifications in an external system whenever an OrderSummary status changes to 'Fulfilled'. Which Salesforce feature provides a push-based mechanism for this?

    • A. Scheduled Apex polling the OrderSummary status field every 15 minutes
    • B. Change Data Capture (CDC) on the OrderSummary object, consumed via the external system's Bayeux/CometD client(correct)
    • C. Outbound Message action triggered by a Workflow Rule on OrderSummary
    • D. Custom REST endpoint that the external system calls on a cron schedule

    Explanation: Change Data Capture (CDC) publishes change events (including field-level changes) on the Salesforce Streaming API channel. External systems subscribe via CometD and receive OrderSummary status change events in real time when the status transitions to 'Fulfilled'. Workflow Rules cannot fire on OrderSummary (a non-standard lifecycle object), and scheduled polling creates unnecessary API calls and latency.

  16. 16. A developer is building a returns portal that calls Salesforce OMS APIs to create a ReturnOrder. Which two API calls are required in the correct sequence? (Choose 2)

    • A. POST to /commerce/orders/{orderSummaryId}/actions/create-return to create the ReturnOrder and ReturnOrderLineItems(correct)
    • B. POST to /sobjects/ReturnOrder/ to insert the record directly
    • C. POST to invoke the EnsureRefundsAsync Flow action via the connect/automation/autolaunched-flows endpoint(correct)
    • D. PATCH to update the ReturnOrder Status to 'Approved' before EnsureRefundsAsync can run

    Explanation: The correct OMS returns API sequence is: (1) POST to /commerce/orders/{orderSummaryId}/actions/create-return — creates the ReturnOrder with line items via OMS business logic; (2) Invoke EnsureRefundsAsync (via the autolaunched flows REST API or a triggered Flow) to process the refund. Directly inserting via /sobjects/ReturnOrder bypasses OMS validation. ReturnOrder does not require a Status PATCH to 'Approved' before refund processing in the standard OMS flow.

  17. 17. An external WMS sends shipment confirmations to Salesforce via REST API to mark FulfillmentOrderLineItems as shipped. Which REST endpoint and verb should the developer use to update individual FulfillmentOrderLineItem shipped quantities?

    • A. PATCH /services/data/vXX.0/sobjects/FulfillmentOrderLineItem/{Id}(correct)
    • B. POST /services/data/vXX.0/commerce/orders/{orderSummaryId}/actions/ship-fulfillment-order-line-items
    • C. PUT /services/data/vXX.0/sobjects/FulfillmentOrder/{Id}
    • D. POST /services/data/vXX.0/composite/batch with multiple sObject updates

    Explanation: FulfillmentOrderLineItem records can be updated via standard REST API PATCH calls on the sobject endpoint. The developer patches QuantityFulfilled and related shipping fields. OMS validates the update and propagates status changes to the parent FulfillmentOrder. A dedicated OMS ship action endpoint does not exist — the standard PATCH approach is used and should be wrapped with appropriate error handling.

  18. 18. A developer is integrating Salesforce OMS with a 3PL that requires order payloads in a proprietary XML format. The Salesforce OMS outbound notification uses Platform Events with JSON payloads. How should the developer handle the translation?

    • A. Use a middleware layer (e.g., MuleSoft, AWS Lambda) that subscribes to the Platform Event, transforms the JSON to XML, and forwards to the 3PL(correct)
    • B. Modify the OMS Platform Event definition to publish XML payloads instead of JSON
    • C. Create a custom Apex trigger on FulfillmentOrder that formats and sends an XML HTTP callout to the 3PL
    • D. Use Salesforce Connect to create an External Object that maps to the 3PL XML feed

    Explanation: Platform Event payloads are always JSON on the Salesforce Streaming API — you cannot change them to XML. The recommended pattern is a middleware layer that subscribes to the Platform Event via CometD, transforms the JSON payload to the 3PL's required XML format, and sends the request. MuleSoft is Salesforce's recommended iPaaS, but any middleware (AWS Lambda, Azure Logic Apps, etc.) can fulfil this role.

  19. 19. A developer needs to implement a custom inventory reservation check before a FulfillmentOrder is submitted. Which is the correct Apex extensibility pattern in OMS?

    • A. Override the FulfillmentOrder before-update trigger to call an external inventory API
    • B. Create an @InvocableMethod Apex class that calls the inventory API and invoke it from the OMS orchestration Flow before the SubmitFulfillmentOrder action(correct)
    • C. Extend the standard OMS FulfillmentService Apex class and override the submit method
    • D. Add a validation rule on FulfillmentOrder that calls an Apex formula to check inventory

    Explanation: The OMS extensibility pattern uses @InvocableMethod Apex classes called as Apex Actions within the orchestration Flow. The developer creates an invocable action that calls the external inventory API, and inserts it in the Flow before SubmitFulfillmentOrder. This keeps business logic in the Flow orchestration layer and avoids mixing trigger logic with Flow-managed OMS processes.

  20. 20. A developer writes an @InvocableMethod that calls an external API from within an OMS Flow. The org administrator notices that the Flow fails with a CALLOUT_FROM_TRIGGER error. What is the root cause?

    • A. Flows cannot call @InvocableMethod actions that make HTTP callouts
    • B. The OMS Flow is triggered by a record-triggered flow or DML operation; callouts cannot be made in the same transaction that performed DML(correct)
    • C. The external API endpoint is not whitelisted in Remote Site Settings
    • D. The @InvocableMethod must be declared as @future to allow callouts

    Explanation: Salesforce does not allow HTTP callouts in the same transaction as DML operations — a CALLOUT_FROM_TRIGGER error occurs when a trigger or record-triggered flow context invokes Apex that makes an HTTP callout. The fix is to use @future(callout=true) in the Apex to execute the callout asynchronously, or to use a Platform Event-triggered Flow (which runs in a separate transaction without the DML-before-callout restriction).

  21. 21. A developer needs to create a custom OMS batch process that cancels FulfillmentOrders that have been in 'Submitted' status for more than 48 hours without a shipment confirmation. Which two Apex patterns must the developer implement? (Choose 2)

    • A. Implement the Database.Batchable interface to query and process FulfillmentOrders in bulk(correct)
    • B. Use System.scheduleBatch() or a Scheduled Apex class to run the batch job periodically(correct)
    • C. Implement the Queueable interface to process FulfillmentOrders one at a time asynchronously
    • D. Use a Flow Scheduled Path on FulfillmentOrder to trigger after 48 hours

    Explanation: For bulk processing across many records on a schedule, the correct pattern is a Batch Apex class (Database.Batchable) combined with Scheduled Apex (implementing Schedulable or using System.scheduleBatch()). Batch Apex handles governor limits by processing records in chunks. A Queueable processes one chain at a time and does not handle bulk efficiently. A Flow Scheduled Path fires per-record and can hit flow interview limits at scale.

  22. 22. An OMS developer is building an @InvocableMethod to call the ERP's pricing API and return the final price for order lines before order activation. The ERP API takes up to 3 seconds to respond. What should the developer do to ensure the Flow does not time out?

    • A. Use a Platform Event to publish the order line data asynchronously; have a subscriber Flow wait for the ERP response via a second Platform Event(correct)
    • B. Increase the Flow transaction timeout from 5 to 30 seconds in the Flow properties
    • C. Set the HTTP callout timeout to 120,000 ms in the Apex HttpRequest and mark the method as @future
    • D. Cache the ERP pricing response in Org Cache (Platform Cache) for 60 seconds to reduce callout latency

    Explanation: Flow transactions have a 10-minute limit but individual callouts must complete within 120 seconds. A 3-second response is within limits, but if the ERP degrades, a synchronous callout can block the Flow. The resilient pattern is to make the ERP call asynchronous: publish a Platform Event with the order data, have the ERP's webhook publish a response event, and use a Wait/Resume element in the Flow. Platform Cache (D) is a valid performance optimisation but does not prevent timeout if the ERP is slow.

  23. 23. A developer needs to enforce a business rule: no order above $50,000 can be fulfilled without a credit check Apex service passing. Where in the OMS codebase should this rule be implemented to guarantee enforcement regardless of how the fulfillment is triggered?

    • A. Validation rule on FulfillmentOrder object
    • B. Before-insert trigger on FulfillmentOrder
    • C. In the OMS orchestration Flow as an @InvocableMethod Apex Action before the CreateFulfillmentOrders step(correct)
    • D. In a Process Builder on the OrderSummary object

    Explanation: The OMS orchestration Flow is the single enforcement point for fulfillment decisions. Adding the credit check as an @InvocableMethod Apex Action in the Flow, before CreateFulfillmentOrders, ensures it runs for every order processed through OMS regardless of the ingestion channel. A before-insert trigger on FulfillmentOrder would also catch programmatic inserts, but combining both approaches (Flow + trigger) creates double enforcement and potential conflicts.

  24. 24. A developer is writing Apex tests for OMS Flow invocable actions. Which Salesforce approach allows the test to verify that the @InvocableMethod correctly creates a FulfillmentOrder without making real external callouts?

    • A. Set Test.isRunningTest() checks inside the invocable method to skip the callout
    • B. Implement the HttpCalloutMock interface and use Test.setMock() to simulate the external API response(correct)
    • C. Use System.runAs() to execute the test as a special API user that has callout permissions disabled
    • D. Use @SeeAllData=true to access existing FulfillmentOrders in the org

    Explanation: Salesforce Apex tests cannot make real HTTP callouts. The correct pattern is to implement HttpCalloutMock with the expected response and register it with Test.setMock(HttpCalloutMock.class, mockInstance). The @InvocableMethod then receives the mock response during tests. Using @SeeAllData=true is an anti-pattern for OMS tests; test data should be created within the test method.

  25. 25. A developer has customised the OMS orchestration Flow and written @InvocableMethod Apex. Before deploying to production, which combination of checks should be included in the deployment validation?

    • A. Run only the Apex unit tests for the invocable methods, as Flows are not testable by Apex
    • B. Run all Apex tests (achieving at least 75% code coverage), validate the Flow deployment with a Change Set validation, and perform end-to-end OMS scenario testing in a full sandbox(correct)
    • C. Deploy the Flow first and Apex separately so changes can be rolled back independently if needed
    • D. Use the Salesforce CLI sf package install command to deploy OMS customisations as a second-generation package

    Explanation: A complete OMS deployment validation includes: (1) Apex unit tests with at least 75% code coverage for all classes; (2) Flow deployment validation via Change Set or Salesforce CLI — this confirms the Flow can be deployed without errors in the target org; (3) end-to-end functional testing of the order lifecycle (ingest → activate → fulfill → pay → return) in a full copy sandbox that mirrors production data volume and configuration. Deploying Flow and Apex separately risks breaking cross-dependencies.