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

# Order Import Troubleshooting

> Recover safely from text parsing, Gmail discovery, matching, draft, and save problems without duplicating orders.

## Start here

The implemented behavior is documented in
[Order Activation](/help/user-flows/order-upload). Photo and image receipt
issues are outside this guide's current scope.

## Text input will not parse

Check that the receipt text:

* is not empty;
* meets the minimum receipt-detail length shown by the app;
* stays under the shared maximum length; and
* includes useful line breaks, product names, quantities, and prices when
  available.

The app preserves the submitted text after a parse or network error and offers
a bounded retry. If the retry limit is reached, edit the text before trying a
new parse attempt.

## Strain matching is unavailable

A matcher outage is different from a valid “no match” result. When the matcher
fails, the Review & Confirm screen keeps all lines and displays **Retry
Matching**. You do not need to paste or upload the receipt again.

You may continue reviewing other fields. Every selected unresolved name must
be marked Yes or No before saving. Yes keeps it on the order and queues
research; No keeps it on the order without research. Neither enters the
immediate stash merge.

## A strain name is wrong

In the text Review & Confirm screen:

1. edit the strain name;
2. commit the edit to start a new match;
3. wait for matching to finish;
4. select a suggested alternative when appropriate; and
5. verify quantity, unit, product type, and price before saving.

Gmail and text orders use the same per-order editing step before commit.

## A saved order is missing from active stash

This can be expected:

* **Stats Only** text saves do not request a stash merge.
* Gmail historical and Quick Sync imports do not auto-add items to stash.
* Only lines with an authoritative resolved strain identity enter the stash
  immediately.
* Unmatched, ambiguous, or placeholder lines remain on the order while
  background resolution proceeds.

Open order detail and use **Add to Stash** when the order has eligible resolved
items. Saved purchase facts can be edited there, but strain identity remains
locked because changing it requires matching and verification again.

## Order draft expired

Active review drafts expire after 30 minutes. A safe recovery projection can
survive a native restart, but raw pasted receipt text is intentionally not
persisted. If the draft cannot be recovered, return to Add Order and submit the
source again.

## Save status is unknown

Retry from the same review instead of starting a fresh upload. The draft-based
idempotency key lets the server reconcile an already committed order without
creating another order or replaying post-save effects.

If the app says the order was saved but could not leave the screen, check order
history before taking another action. Navigation or local cleanup failure does
not mean the server commit failed.

## Gmail finds no candidates

1. Confirm the connected Google account is the mailbox receiving the receipts.
2. For Quick Sync, select a shop that is not marked **Needs domain**.
3. If no shop is Quick Sync-ready, use **Manage Shops** or Gmail's inline shop
   setup to confirm a receipt domain.
4. Try another saved shop.
5. Use **Advanced Options** for a broader historical date range.
6. Use text input when a specific email can be copied manually.

Contact email and website can suggest a receipt domain, but the suggestion must
be explicitly confirmed before Gmail uses it as search scope.

## Gmail is stuck or reports an error

* Reopen the wizard: active jobs and review steps can resume from Convex.
* A stale local scanning/classifying state with no resumable job is reset to
  idle by the controller.
* Reconnect Gmail when the error says access expired or was revoked.
* Retry after Gmail rate limiting.
* Use Advanced Options if an incremental history window is too large.
* Do not repeatedly start new scans; durable scheduling retries reuse the same
  logical attempt.

## Some Gmail messages failed

The completion screen separates successes, duplicates, no-item results, and
failures. Retry the failed set. Successful or duplicate message IDs are not
re-imported.

An email that consistently returns no items may not contain a parseable receipt
body. Copy the receipt details into text input to use the same editable review.

## Duplicate Gmail candidate appears

A previously imported email may appear in discovery, but the compound user and
Gmail message ID check prevents a second order. It should finish as a duplicate
and should not increment `totalImported`.

## The dispensary is wrong or duplicated

Text and Gmail review let you choose or correct the shop before commit. Changing
the historical shop label later detaches a stale managed-shop link rather than
misattributing the order. Shop merging is not implemented.

You can edit or delete the shop record and edit mutable purchase facts on the
saved order. Deleting the shop does not rewrite historical order names.

<CardGroup cols={2}>
  <Card title="Order Activation" icon="receipt" href="/help/user-flows/order-upload">
    Full implemented state and recovery diagrams.
  </Card>

  <Card title="Gmail Sync" icon="envelope" href="/help/features/gmail-sync">
    Setup, import rules, privacy, and known gaps.
  </Card>

  <Card title="Managing Shops" icon="store" href="/help/features/dispensaries">
    Shop fields and Quick Sync readiness.
  </Card>

  <Card title="Sync Problems" icon="rotate" href="/help/troubleshooting/sync-problems">
    General connection troubleshooting.
  </Card>
</CardGroup>
