# Troubleshooting Order Processing

When an order is processed through the Order Orchestration Framework, every step is recorded in a **Process Event**. This page explains how to find errors, inspect callouts, view logs, and resolve common issues.

## Process Events

Process events are created for every order execution. They contain:

* Callouts made to other systems, including endpoint and time to execute
* Payload for each individual callout
* Errors from third-party systems
* Detailed logs on the order processing

### How to Find Process Events

#### Through Events

1. Go to **Events** in Limio.
2. Click on **Process Events** in the upper right corner.
3. Search by **Created Date** (you will need to have "Filter by Created" activated). You can also filter to show only process events with errors.

#### Through Subscriptions

If you are looking for a specific customer:

1. Go to **Subscriptions** and search for the customer.
2. Find the **Event** table and click on the event you are interested in.
3. Click on the **Process Events** link.

## Inspecting Callouts

Limio allows you to view each callout made to a third-party system during order processing. The callout table includes a timestamp, the specific endpoint called, and the time taken to perform the callout.

### Viewing Callout Details

Click on any individual callout to view the payload sent to the endpoint.

### Inspecting Zuora Callouts

When looking at callouts to Zuora, the most important callout is typically the POST to `https://rest.apisandbox.zuora.com/v1/orders` (or the production equivalent). By inspecting this callout, you can see the exact payload sent for a New Order, Cancellation, Add/Remove Product, Update Product, etc.

1. In the process event, find the **Callout** table.
2. Click on **Details** for the callout you want to inspect.
3. You'll see a JSON view of the callout including errors, request timings, and order details.

Learn more about how Limio processes different customer events in Zuora: [How Limio Events Update Zuora](https://docs.limio.com/integrations/keeping-zuora-and-limio-in-sync/how-limio-events-updates-zuora-for-commerce).

## Viewing Processing Logs

To see a step-by-step breakdown of what happened during order processing, scroll to the bottom of the process event page and look for the **Message** header section. This shows all processing logs with timestamps.

## Errors from Third-Party Systems

If a third-party system fails, the process event includes the top-level error message and detailed logs.

For example, Zuora might reject an order because of a missing product code — this means the Limio Offer wasn't properly configured.

### Understanding Zuora Errors

When a Zuora callout fails:

1. Select the `v1/orders` POST request in the callouts table.
2. Expand the response object and copy the error `code` value.
3. Look up the code in the [Zuora Error Code Documentation](https://developer.zuora.com/docs/guides/error-codes/).

## Common Salesforce V3 and Platform Event Errors

{% hint style="danger" %}
**Error: "No such column 'firstName' on sObject of type i42as\_\_OrderEvent\_\_e"**

This means a field referenced in the platform event doesn't exist on the `i42as__OrderEvent__e` object. Check:

* The field exists in Salesforce Setup > Platform Events > OrderEvent\_\_e > Custom fields
* The field name is spelled correctly (field names are case-sensitive)
* Custom fields end with `__c` (e.g., `firstName__c`, not `firstName`)
  {% endhint %}

{% hint style="danger" %}
**Error: "STRING\_TOO\_LONG"**

The content in a specific field exceeds the character limit set on the platform event field. Modify the field length in the platform event field definition in Salesforce Setup.

**Important:** Any platform event that triggers this error will not be resent and will be lost.
{% endhint %}

## Error Webhook for Automated Monitoring

Instead of manually checking process events, you can configure an **Error webhook** to be notified automatically when any plugin fails. This is useful for:

* Alerting your operations team via Slack, PagerDuty, or email
* Feeding failures into a data warehouse for tracking
* Triggering automated retry or recovery workflows

See [Webhooks and Notifications](https://docs.limio.com/integrations/webhooks-and-notifications#error-webhook) for configuration details.
