EN

Order Creation Modes & Google Sheets Export — RUTHH COD Form & Upsells

Understand how RUTHH COD Form & Upsells creates idempotent Shopify Orders (orderCreate) or Draft Orders (draftOrderCreate), and configure Integrations → Google Sheets (/app/integrations/google-sheets) to export COD orders automatically in real time.

  • You have configured your preferred Order Creation Mode in Settings → General (/app/settings/general).
  • For Google Sheets export, you have a Google account with access to Google Drive / Google Sheets.

1. Choose Between Standard COD Orders & Draft Orders

Section titled “1. Choose Between Standard COD Orders & Draft Orders”
  1. Open Settings → General (/app/settings/general).
  2. Under Order Creation, select:
    • Standard COD Order (STANDARD): Calls Shopify orderCreate inside an idempotent transaction, applying your configured order tags (COD, RUTHH_COD), shipping line, additional COD fee, and UTM customAttributes.
    • Save as Draft Order (DRAFT): Calls Shopify draftOrderCreate so your team can review and confirm orders in Shopify Admin → Orders → Drafts before converting them into final orders.
  3. Click Save. Note that when Draft Order mode is enabled, Admin Home and Analytics automatically surface Orders / Draft Orders metrics.

2. Connect Google Sheets via Least-Privilege OAuth (drive.file)

Section titled “2. Connect Google Sheets via Least-Privilege OAuth (drive.file)”
  1. Navigate to Integrations → Google Sheets (/app/integrations/google-sheets).
  2. Click Connect Google Account.
  3. Complete the Google OAuth consent screen. The app requests only the narrow https://www.googleapis.com/auth/drive.file scope (plus basic account email identity)—meaning the app can access only spreadsheets you explicitly create through the app or select via the Google Picker, never your broader Google Drive files.

3. Create or Select a Destination Spreadsheet & Worksheet

Section titled “3. Create or Select a Destination Spreadsheet & Worksheet”
  1. Once connected, choose how to bind a spreadsheet:
    • Create New Spreadsheet: Creates a dedicated spreadsheet in your Google Drive in one click and binds it automatically.
    • Select Existing Spreadsheet (Google Picker): Opens the official Google Picker modal so you can grant drive.file access to an existing spreadsheet.
  2. Select the target Worksheet (Tab). The app binds to the immutable numeric sheetId (in addition to caching the sheet title) so renaming the tab inside Google Sheets does not break exports.
  1. Under Column Preset, choose the data depth exported for each order:
    • MINIMAL: Essential order ID, timestamp, customer contact, delivery address, items summary, and total.
    • MARKETING: Adds UTM parameters (utm_source, utm_medium, utm_campaign, utm_term, utm_content), discount details, and funnel metadata.
    • FULL: Complete operational export including line-item SKUs, variant IDs, shipping rate details, additional COD fees, order creation mode (STANDARD vs DRAFT), and fraud/verification status.
  2. Under Row Mode, select:
    • ORDER (One row per COD order): Consolidates all purchased items into a single row per order.
    • PRODUCT (One row per line item): Writes a separate row for each line item in the order while repeating order-level identifiers.
  3. Toggle Enable Export on and click Save (or use Send Test Row to verify your spreadsheet binding immediately).
  • Spreadsheet tab was renamed in Google Sheets: Because the exporter resolves the target tab by its numeric sheetId, renaming the tab normally continues working; click Refresh Worksheets in /app/integrations/google-sheets to update the displayed tab name.
  • Draft Orders not appearing in external ERPs that only watch finalized orders: Remember that Draft Orders reside under Orders → Drafts in Shopify until marked as paid or completed. Both Standard and Draft COD orders ARE exported to Google Sheets automatically.