Documentation. This page is ready

Documentation

Complete technical documentation for Order Bulk Delete Manager

Overview


Order Bulk Delete Manager is a professional Shopify app for efficient order management

Technology Stack

  • React:
  • Remix:
  • TypeScript:
  • Prisma:
  • PostgreSQL:

System Architecture

The app follows a serverless architecture deployed on Vercel with edge caching for optimal performance

  • Modern serverless architecture with edge caching:

Features


Order Management Core

  • View all orders with pagination:
  • Bulk selection with checkboxes:
  • Order details modal:
  • One-click single deletion:

Filtering & Sorting InfoEssential

  • Date range presets and custom:
  • Payment status filtering:
  • Fulfillment status filtering:
  • Free-text search:

Export & Reporting SuccessRecommended

  • CSV export for selected orders:
  • All order details included:
  • Pre-deletion backup:
  • Audit log export:

UX Enhancements AttentionPower User

  • Keyboard shortcuts (Ctrl+K:
  • Ctrl+A):
  • Loading skeletons:
  • Toast notifications:
  • Progress indicators:

Security & Compliance CriticalEnterprise

  • GDPR mandatory webhooks:
  • Session management:
  • Audit logging:
  • Data encryption:

API Reference


GraphQL Queries

orders

Fetches orders with pagination and filtering support

query GetOrders($first: Int!, $query: String, $sortKey: OrderSortKeys, $reverse: Boolean, $after: String) {
  orders(first: $first, query: $query, sortKey: $sortKey, reverse: $reverse, after: $after) {
    edges {
      cursor
      node {
        id
        name
        createdAt
        totalPriceSet { shopMoney { amount currencyCode } }
        displayFinancialStatus
        displayFulfillmentStatus
        lineItems(first: 10) {
          edges {
            node {
              title
              quantity
              originalUnitPriceSet { shopMoney { amount currencyCode } }
            }
          }
        }
      }
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      endCursor
      startCursor
    }
  }
}

orderDelete

Permanently deletes a single order by ID

mutation OrderDelete($orderId: ID!) {
  orderDelete(orderId: $orderId) {
    deletedId
    userErrors {
      field
      message
    }
  }
}

Query Parameters

ParameterTypeDescription
firstInt!Number of orders to fetch (max 250)
queryStringSearch query string for filtering
sortKeyOrderSortKeysField to sort by (CREATED_AT, UPDATED_AT, etc.)
reverseBooleanReverse sort order (true/false)
afterStringCursor for pagination

Rate Limits

Shopify enforces rate limits on API calls. The app handles these automatically.

  • 50 orders per deletion request:
  • 2-second delay between batches:
  • Automatic retry on rate limits:
  • Queue system for large operations:

Tip: Work in batches of 50 or fewer orders for optimal performance


Database Schema


Session

Stores Shopify session tokens for authentication

model Session {
  id          String   @id
  shop        String
  state       String
  isOnline    Boolean  @default(false)
  scope       String?
  expires     DateTime?
  accessToken String
  userId      BigInt?
  firstName   String?
  lastName    String?
  email       String?
  accountOwner Boolean  @default(false)
  locale      String?
  collaborator Boolean? @default(false)
  emailVerified Boolean? @default(false)
}

AppInstallation

Tracks installed shops and their settings

model AppInstallation {
  id            String    @id @default(uuid())
  shop          String    @unique
  isActive      Boolean   @default(true)
  installedAt   DateTime  @default(now())
  uninstalledAt DateTime?
  @@index([shop])
}

AuditLog

Records all deletion actions for compliance

model AuditLog {
  id          String   @id @default(uuid())
  shop        String
  action      String
  orderId     String?
  orderName   String?
  orderValue  String?
  reason      String?
  performedBy String?
  metadata    Json?
  createdAt   DateTime @default(now())
  @@index([shop])
  @@index([createdAt])
  @@index([action])
}

GdprRequest

Tracks GDPR webhook requests and responses

model GDPRRequest {
  id            String    @id @default(uuid())
  shop          String
  requestType   String    // 'customers/data_request', 'customers/redact', 'shop/redact'
  customerId    String?
  customerEmail String?
  payload       Json
  status        String    @default("PENDING") // PENDING, COMPLETED, FAILED
  completedAt   DateTime?
  createdAt     DateTime  @default(now())
  @@index([shop])
  @@index([requestType])
  @@index([status])
}

Webhooks


App Lifecycle Webhooks

app/installed

POST /webhooks/app/installed

Triggered when a merchant installs the app

app/uninstalled

POST /webhooks/app/uninstalled

Triggered when a merchant uninstalls the app

app/scopes_update

POST /webhooks/app/scopes_update

Triggered when app permissions change

GDPR Compliance Webhooks CriticalRequired

customers/data_request

InfoPOST /webhooks/compliance

Request for customer data export

Required Response 200 OK with customer data or confirmation

customers/redact

WarningPOST /webhooks/compliance

Request to delete customer data

Action Remove all customer PII from records

shop/redact

CriticalPOST /webhooks/compliance

Request to delete all shop data

Action Complete data deletion within 48 hours

Webhook Security

  • HMAC signature verification:
  • Timestamp validation:
  • Replay attack prevention:
  • Secure endpoint URLs:

Security


Authentication

  • OAuth 2.0 flow:
  • Session token validation:
  • HMAC verification:
  • Secure cookie handling:

Data Protection

  • TLS encryption in transit:
  • AES encryption at rest:
  • Regular backups:
  • Access logging:

Required Permissions

The app requests minimal permissions needed for functionality

ScopePurpose
read_ordersView orders for display and filtering
write_ordersDelete orders as requested
read_customersDisplay customer names (optional)

Compliance

  • GDPR compliant:
  • Shopify App Store certified:
  • Regular security audits:
  • Data processing agreements:

Performance


Optimization Strategies

  • Edge caching for static assets:
  • Lazy loading for large lists:
  • Optimistic UI updates:
  • Debounced search queries:

Performance Metrics

MetricTargetActual
Initial Load< 2s~1.2s
Page Navigation< 500ms~200ms
Filter/Search< 300ms~150ms
Single Delete< 1s~800ms
Bulk Delete (50)< 30s~20s

Best Practices

  • Use filters to reduce order count:
  • Work in batches of 50:
  • Export before large deletions:
  • Schedule bulk operations off-peak:

Troubleshooting


Common Issues

Orders Not Loading

Spinner shows indefinitely, Empty order list despite having orders

  • Refresh the page and retry
  • Check your internet connection
  • Clear browser cache
  • Reinstall the app if persistent

Cannot Delete Orders

Error message after delete attempt, Orders remain after confirmation

  • Wait a moment and retry
  • Check for pending fulfillments
  • Verify order status in Shopify admin
  • Contact support if persistent

Slow Performance

Long loading times, Laggy interface

  • Use filters to reduce order count
  • Clear browser cache
  • Try a different browser
  • Check your internet speed

App Not Installing

Installation fails, Permission errors

  • Ensure you are shop owner or admin
  • Check Shopify status page
  • Try a different browser
  • Contact Shopify support

Error Codes

Error CodeMeaningSolution
401Session expiredRefresh page or reinstall app
403Permission deniedCheck app permissions
429Rate limitedWait and retry in smaller batches
500Server errorContact support

Getting Help

If issues persist, contact our support team