> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kibocommerce.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Suggestion Logs and Debug

The **Suggestion Logs** and **Routing Debugger** pages of the routing UI help you make calls with the [Order Routing REST APIs](/api-overviews/openapi_orderrouting_overview) to retrieve the record of logical decision made during routing and test your configurations.

<CardGroup cols={2}>
  <Card title="Order Routing Concepts" icon="book-open" horizontal href="/concept-guides/order-routing" data-rec="concept-guide">
    Understand how Kibo routes orders to fulfillment locations
  </Card>

  <Card title="Developer Reference" icon="code" horizontal href="/developer-guides/order-routing" data-rec="developer-doc">
    See the Order Routing API documentation for programmatic access
  </Card>
</CardGroup>

The UI offers an improved user experience on the logs and debugger pages, but requires you to select a specific site and strategy to test.

### Suggestion Logs

The Suggestion Logs page allows you to place a Get Suggestion Log API request through the user interface. By using the Candidate Suggestion and Routing Suggestion calls, you can test your order routing configurations by retrieving the list of possible location candidates for a given order and Order Routing's analysis of the best assignment location.

1. Use the **Current Site** selector in the top right to specify which site's routing you want to retrieve logs for.
2. Select the **Option** of whether you want to search based on Suggestion ID, Order Number, External Response ID, or Return Number.
3. Enter the **Value** of that field that you want to search for.
4. Click **Get Logs**.  <img src="https://mintcdn.com/kibocommerce-59e68a4a/7XXCwOQjUsW_CZYB/img/suggestion-logs-update.png?fit=max&auto=format&n=7XXCwOQjUsW_CZYB&q=85&s=e584c26d78ffeb4ab7185292ad153e6c" width="882" height="325" data-path="img/suggestion-logs-update.png" />

This will retrieve the record of all logical decisions that Order Routing made to achieve that suggestion result.

### Routing Debugger

The Suggestion Debug page allows further testing of the Routing Suggestion logic based on specific item and inventory data. The page will then process the call and return a breakdown of the result, listing location candidates and the logical steps that were taken to determine the routing result.

To begin configuring the call, you must specify which order items are being routed and define how you want to evaluate inventory.

1. Use the **Current Site** selector in the top right to specify which site's routing you want to test.
2. Select the **Strategy** that you want to test.
3. In the Order Items pane, either fill in the existing form with the appropriate identifiers or use the **Edit in JSON** toggle to modify the request directly. This order item information will be auto-populated in the Inventory Locations pane.<img src="https://mintcdn.com/kibocommerce-59e68a4a/RFia3SXPeyM44geJ/img/routing-debugger.png?fit=max&auto=format&n=RFia3SXPeyM44geJ&q=85&s=0358967f93899642b31816e39a43d0be" width="1514" height="757" data-path="img/routing-debugger.png" />
4. In the Inventory Locations page, enable or disable the **Use Real Inventory** toggle depending on whether you want to reference current inventory levels for the request or provide mock inventory data.
   * Using real inventory does not perform any allocation, deallocate, or other inventory adjustment calls. It only reads current inventory from your site. The inventory location form and Edit in JSON toggle will be disabled when using real inventory.
   * If using mock inventory, provide the inventory data in the inventory location form or directly edit the request by toggling **Edit in JSON**. This could be a copy/paste of a real [Get Inventory API](/api-reference/inventory/get-inventory-post) response with some fields adjusted for testing purposes. This gives you the flexibility to test Order Routing's suggestion logic in different scenarios without the need to modify actual inventory data.
5. Click **Run Routing Test**. The page will validate the JSON and if there are no errors, it will process the request and display the results in a series of sections that appear at the bottom of the page.

The initial information displayed is either the suggested assignment location(s) or a state change, such as if it was moved to Customer Care due to failover actions as showon below. After that initial data, each section describes the logical decisions that Order Routing made (selecting a scenario and sorting location candidates) as well as listing any relevant failover after-actions.

Switch between the **Suggestion Logs** and **JSON Suggestion Logs** tabs to view the results in your preferred format.

<img src="https://mintcdn.com/kibocommerce-59e68a4a/Es64Q0i6Wdv3qOS9/img/debugger-state-changes-and-info.png?fit=max&auto=format&n=Es64Q0i6Wdv3qOS9&q=85&s=75ec488002eeb2aecf9104ad9d6288c7" alt="An example response of an order that went to Customer Care" width="959" height="798" data-path="img/debugger-state-changes-and-info.png" />
