Shoeboxed X-Ray Vision
Extractions
Prompts
← Back to Prompt
Edit Prompt #1
AI Model
gemini-2.5-flash
Prompt Text
IMPORTANT: Scan the ENTIRE receipt image from top to bottom, including any separate sections or boxes at the bottom. The receipt may be multiple images. Payment information is often in a completely separate section. IMPORTANT: If the receipt image appears rotated or sideways, mentally rotate it to read the text correctly before extracting information. The user uploaded the receipt in {{upload_date}}. Use this as context for AMBIGUOUS dates only. CRITICAL: If you see a clear 4-digit year on the receipt (2024, 2023, 2022, etc.), USE IT - do not change it to match the upload date. Only default the year to upload timeframe if the date is truly ambiguous (like '6/3' with no year shown, or just '09' that could be multiple years). Handwritten dates in notes sections or memo fields may also contain the correct date - check those too. Extract the following fields from this document and return as JSON with two sections: "fields" (required Shoeboxed schema) and "additional_extraction" (extra analysis fields). CRITICAL: DO NOT include fields with null values - omit them entirely from the JSON. { "fields": { "seller": "Business name only (exclude store numbers like #1234)", "date": "Receipt date in ISO 8601 format with time ALWAYS set to 12:00:00Z (YYYY-MM-DD 12:00:00Z). Example: 2025-07-01 12:00:00Z", "total": { "on_document": 0.00, "in_account_currency": 0.00 (same as on_document unless currency conversion needed) }, "tax": { "on_document": 0.00, "in_account_currency": 0.00 (OMIT this entire 'tax' object if no tax found on receipt) }, "currency": "Currency code (USD/CAD/AUD). If not explicit, infer from: Canadian cities (Vancouver, Toronto, etc.) + INTERAC payment + metric units (kg, tonne) + Canadian spelling (colour, centre, tonne) + GST/PST/HST taxes + A1A1A1 postal code = CAD. Australian cities + EFTPOS + metric + 4-digit postal code = AUD. Otherwise USD.", "payment_type": { "type": "cash, card, check, paypal, or other. CRITICAL: Payment info may be in a SEPARATE SECTION at the bottom of the receipt (not part of main transaction). Look for sections labeled 'Credit Card Remit', 'Payment Details', 'Card Information', or 'Tender'. USPS receipts commonly show payment in a bottom section. Scan the ENTIRE receipt. If you see card name (VISA, Mastercard, CHASE), approval number, or masked card number (XXXXXXXXXXXX1234), use 'card'. If you see 'Gift Card Redeem', 'Stored Value', or balance remaining, use 'other'. If document shows 'Terms: EFT' or 'Terms: NET 30', this is an INVOICE (not a receipt), use 'other' for payment terms.", "last4": "1234 (OMIT this field entirely if no card number found. If card payment: SCAN ENTIRE RECEIPT including separate payment sections at bottom. Look for 'Credit Card Remit' or payment boxes. Common patterns: XXXXXXXXXXXX1234, XXXX XXXX XXXX 1234, ************1234, 'Account #: XXXXXXXXXXXX2869', 'Acct: XX1234', 'Visa 1234 AUTH123', 'Card Name: VISA' with account number nearby. Extract ONLY the last 4 numeric digits of the CARD NUMBER. Examples: 'Account #: XXXXXXXXXXXX2869' → '2869', 'Visa 1042 06741G' → '1042' NOT '0674'. IGNORE: Approval/Auth codes (018496, 825885), Seat, Member, Tran ID, AID, App#, Reference numbers, Tracking numbers.)" }, "note": "Any special notes, memo fields, or handwritten text on receipt (OMIT if empty)", "invoice_number": "Invoice or transaction number if present (OMIT if not found)", "city": "City from vendor address (OMIT if not found)", "state": "State/Province from vendor address (OMIT if not found)", "zip": "Postal/ZIP code from vendor address (OMIT if not found)", "country": "Country from vendor address (OMIT if not found)", "first_name": "First name if this is a personal contact card or receipt shows customer name (OMIT if not found)", "last_name": "Last name if this is a personal contact card or receipt shows customer name (OMIT if not found)", "company": "Company name if different from seller (OMIT if not found)", "email": "Email address if shown on receipt (OMIT if not found)", "website": "Website URL if shown on receipt (OMIT if not found)", "work_phone": "Business phone number from receipt (OMIT if not found)", "cell_phone": "Mobile phone number if shown (OMIT if not found)", "name": "Full name if shown (alternative to first_name/last_name) (OMIT if not found)" }, "additional_extraction": { "document_type": "receipt, invoice, statement, deposit, letter, or other. A RECEIPT shows proof of payment made (APPROVED, Tender Type, CHANGE). AN INVOICE is a bill for future payment (Terms: NET 30, Balance Due). A STATEMENT summarizes account activity (indicators: 'Statement', 'Account Summary', 'Coverage Period', 'Previous Balance', 'Current Charges', multiple transactions listed - statements are NOT receipts). A DEPOSIT is money going INTO an account (bank deposit slip, 'Deposit to BUSINESS CHECKING', Prev Bal/New Bal, deposit transaction - this is INCOME not an expense). A LETTER is correspondence. If payment was tendered/approved, it's a receipt.", "document_description": "One sentence describing what this document is (e.g., 'Medical billing statement for imaging services', 'Receipt for auto towing service', 'Utility bill for electric service')", "address": "Full vendor address from receipt (street, city, state, zip) - complete address in one string (OMIT if not found)", "tip": 0.00 (for restaurant receipts: check for handwritten tip amounts. If customer handwrote a tip and left total blank, this amount should already be included in fields.total calculation. OMIT if not a restaurant receipt or no tip found), "categories": ["Primary accounting category"] (analyze LINE ITEMS purchased, not just store name. QuickBooks categories: Meals & Entertainment, Groceries, Office Supplies, Auto & Truck Expenses, Travel, Utilities, Professional Services, Advertising & Marketing, Supplies & Materials, Other Business Expenses. Return null for invoices/statements/deposits/letters since those are not expenses.), "full_datetime": "Full date and time from receipt in ISO 8601 format (YYYY-MM-DD HH:MM:SS) - preserve the actual time shown on receipt. Example: 2025-07-01 15:41:00" } } IMPORTANT for restaurant receipts with handwritten tips: If customer handwrote a tip amount and left total blank, ADD the tip to the subtotal/check amount to calculate the actual total spent. Look for handwritten numbers in TIP and TOTAL fields. Pay extra attention to handwritten amounts - handwritten digits can be written separately with spacing (e.g., '1 2 0 9' should be read as 1209), and the first digit may be separated or unclear. Double-check all digits are included. IMPORTANT for unreadable totals: If the total line is unreadable/blurry, calculate it from other values: Cash Paid - Change = Total, or Subtotal + Tax = Total. IMPORTANT for STATEMENTS (bills for future payment): Look for 'Total Amount Due', 'Balance Due', 'Amount Due', 'Please Pay', 'Amount Enclosed'. Check the payment stub/tear-off section at the bottom. The total may be prominently displayed in a box or highlighted section. CRITICAL RULES: 1. DO NOT include fields with null values - omit them entirely from the JSON 2. Date field in 'fields' section: Always use 12:00:00Z for the time portion (YYYY-MM-DD 12:00:00Z) 3. Full datetime in 'additional_extraction': Preserve the actual time from the receipt 4. Tax field: If no tax found, omit the entire 'tax' object 5. Card last4: If no card number found, omit the 'last4' field entirely (do not set to null) 6. All optional fields: Only include if you found a value, otherwise omit completely Return only valid JSON, nothing else. Remember to omit fields that are null/empty rather than including them.
Cancel