---
schema_version: "1"
id: 6e929bb8355c08d484d7b6dc73af4d67f8388612ccf51b8bc27871ff908687d1
title: Find and Cancel Order Items with AI Tools
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/om_steelthread_cancel_items.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.om_steelthread_cancel_items.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 7bdc8252a74daa801ad8a985156982950c223953057f63aeb2ae1682cda35cbf
description: Look up an order by order number and cancel every eligible item in a single conversation. A service agent describes the goal in natural language. The AI client checks eligibility, submits the cancellation, and confirms the result without opening the Order Management console.
products:
  - Commerce
  - Salesforce Order Management
release: "264"
---
# Find and Cancel Order Items with AI Tools

Look up an order by order number and cancel every eligible item in a single conversation. A service agent describes the goal in natural language. The AI client checks eligibility, submits the cancellation, and confirms the result without opening the Order Management console.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=commerce.om_editions.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

Canceling order items is a high-volume servicing task. To do it by hand, you navigate the order, check each line item's remaining quantity, and submit a change order. The agent does that work through the Order Management APIs. The person doing the job stays in a single conversation and keeps oversight of every change.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-om_order_management-264-0-0-production-enus/4c4844e3-a194-4a65-95b7-17291a6dbefa/images/icon_note.png)

Note Because an AI client uses large language models, which are probabilistic, results can vary from one run to the next. If you get an unexpected result, describe to the agent what happened so that it can help you diagnose and adjust. You don't need a specific model.

## Scenario

Northern Trail Outfitters runs a high-volume support desk. Priya, a service agent, takes a call from a customer who wants to cancel two items on order 00035107 before they ship. The console path is to open the order, read each line item's quantity available to cancel, and select a reason, then submit a change order. That navigation takes several minutes per call. Instead, Priya asks the AI client to pull up the order and cancel the eligible items. In under a minute, the agent confirms the order, cancels the items that Order Management hasn't allocated or fulfilled, and reports the refunded amount. Priya handles more calls with fewer misfires, and every cancellation follows the same eligibility checks.

## Requirements

Complete the shared setup in [AI Agent Use Cases for Order Management](https://help.salesforce.com/s/articleView?id=commerce.om_steelthread_overview.htm&release=264.0.0&type=5 "Use an AI agent to set up Order Management and complete common Order Management tasks conversationally, such as finding and canceling order items.").

This use case also needs:

- Active orders with items that are still eligible to cancel—not yet allocated or fulfilled.
- The Order Management Agent or Order Management Operations Manager permission set. If your org doesn't include Omnichannel Inventory, use Order Management: Agent without Omnichannel Inventory or Order Management: Operations Manager without Omnichannel Inventory.
- Order numbers that match between your storefront and Order Management.

The order-servicing functionality comes from the **Salesforce Order Management APIs** (Generally Available), which read the order summary and submit the item cancellation. This use case is recommended for service agents who are comfortable with order servicing. It assumes familiarity with order status, allocation, and fulfillment.

## Agentic Tips

- Describe your goal in your own words. For example:
    - "Find the last five orders."
    - "Pull up order 00035107 and cancel the items that are still eligible."
    - "Cancel the backordered items on order 00035107."
    - "Which items on this order can I still cancel? Go ahead and cancel them."
- Include the order number, the items to cancel, a cancellation reason, and whether to cancel shipping.
- Have the agent find the order and report which items are eligible before it acts. You confirm the items, and then the agent submits the cancellation and rereads the order to verify the result.
- Approve the cancellation. Review the eligible-items list and confirm it before the agent submits.
- Avoid pasting credentials into a prompt. The agent acts as your authenticated user through the connected org.

## Find and Cancel Eligible Order Items

Find an order by order number and cancel every eligible item.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=commerce.om_editions.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

1. Confirm that your AI client is connected to your Order Management org as an authenticated user with permission to read orders and submit cancellations.
2. Ask the agent to find the order by order number.
    
    The agent returns the order number, status, account, order total, order date, and the number of line items.
3. Ask the agent to cancel items.
    
    The agent checks each line item's quantity available to cancel and tells you which items are eligible.
4. Choose the items and a cancellation reason, and decide whether to cancel shipping.
5. Review the request and confirm it.
    
    The agent submits all eligible items in a single cancellation.
6. Let the agent reread the order to confirm the result.

The agent reports that the cancellation was submitted and shows the updated order status. A change order is created, the order totals are updated, and the status of each canceled item reflects the remaining ordered quantity. If payment was already captured for the canceled items, the excess funds are refunded. The agent reports the outcome for each item and doesn't treat a partial failure as a clean success.