Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Mercaline2024/Ecomdrop-ia-connector-2/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Ecomdrop integration enables automated order processing through intelligent workflows. When orders are created in your Shopify store, they are automatically sent to Ecomdrop for processing, and your orders are updated with tags based on the processing status.

Getting Your API Key

To connect your store with Ecomdrop, you’ll need an API access token from your Ecomdrop account.
1

Access Ecomdrop Panel

Log in to your Ecomdrop account at panel.ecomdrop.app
2

Navigate to API Settings

Go to your account settings and locate the API section
3

Generate Access Token

Create a new API access token or copy your existing token. This will be your X-ACCESS-TOKEN.
4

Save the Token

Keep this token secure - you’ll need it to configure the app
Never share your API token publicly or commit it to version control. Treat it like a password.

Configuring the Integration

1

Open App Configuration

In your Shopify admin, navigate to Apps > Ecomdrop IA Connector > Configuration
2

Enter API Key

Paste your Ecomdrop API token in the “Ecomdrop API Key” field
3

Select Flows

Choose which Ecomdrop flows to trigger for:
  • New orders (ORDERS_CREATE webhook)
  • Abandoned checkouts (CHECKOUTS_CREATE webhook)
4

Save Configuration

Click “Save” to activate the integration

Available Flows

The app fetches your available flows from Ecomdrop and displays them for selection:
GET https://panel.ecomdrop.app/api/accounts/flows
Headers:
  X-ACCESS-TOKEN: your_api_key
  accept: application/json

Response Format

[
  {
    "id": "flow_123",
    "name": "Process Order",
    "description": "Automated order processing workflow",
    "status": "active"
  }
]

Triggering Workflows

Automatic Triggering

When configured, the app automatically triggers your selected Ecomdrop flows when:
  1. New Order Created - Shopify sends ORDERS_CREATE webhook
  2. Checkout Abandoned - Shopify sends CHECKOUTS_CREATE webhook
The app sends comprehensive order data to your Ecomdrop flow:
{
  "orderId": "gid://shopify/Order/1234567890",
  "orderName": "#1001",
  "orderNumber": 1001,
  "createdAt": "2024-03-04T12:00:00Z",
  "totalPrice": "99.99",
  "currency": "USD",
  "financialStatus": "PAID",
  "fulfillmentStatus": "UNFULFILLED",
  "lineItems": [
    {
      "id": "gid://shopify/LineItem/123",
      "title": "Product Name",
      "quantity": 2,
      "price": "49.99",
      "sku": "PROD-001",
      "variantId": "gid://shopify/ProductVariant/456"
    }
  ],
  "customer": {
    "email": "customer@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "phone": "+1234567890"
  },
  "shippingAddress": {
    "firstName": "John",
    "lastName": "Doe",
    "address1": "123 Main St",
    "city": "New York",
    "province": "NY",
    "country": "United States",
    "zip": "10001",
    "phone": "+1234567890"
  },
  "shop": "yourstore.myshopify.com",
  "eventType": "order_created",
  "callbackUrl": "https://your-app.com/api/ecomdrop/callback",
  "callbackApiKey": "your_api_key"
}

Manual Triggering via API

You can also trigger flows programmatically:
POST https://panel.ecomdrop.app/api/flows/{flowId}/trigger
Headers:
  X-ACCESS-TOKEN: your_api_key
  Content-Type: application/json
  
Body:
{
  "orderId": "gid://shopify/Order/123",
  "orderName": "#1001",
  // ... additional order data
}

Callback System

How It Works

Ecomdrop processes orders asynchronously to avoid timeouts. When processing completes, Ecomdrop calls back to update your order:
1

Order Created

Shopify webhook triggers and sends order data to Ecomdrop
2

Ecomdrop Processes

Your flow processes the order (may take minutes)
3

Callback Sent

Ecomdrop POSTs results to your callback URL
4

Order Updated

App updates Shopify order with status tags

Callback Endpoint

POST /api/ecomdrop/callback

Expected Payload

Ecomdrop should send this payload when processing completes:
{
  "orderName": "#1001",
  "shop": "yourstore.myshopify.com",
  "apiKey": "your_ecomdrop_api_key",
  "status": "success",
  "tag": "ecomdrop-processed"
}

Callback Parameters

apiKey
string
required
Your Ecomdrop API key for authentication
orderName
string
required
Order identifier in format #1001 (this is what Ecomdrop receives)
orderId
string
Alternative: GraphQL order ID like gid://shopify/Order/123
shop
string
Store domain (e.g., yourstore.myshopify.com). Optional if API key identifies the shop.
tag
string
Single tag to add to the order
tags
string | array
Multiple tags as array ["tag1", "tag2"] or comma-separated string
status
string
Processing status: success, completed, pending, error, or failed. Automatically mapped to tags.

Status Tag Mapping

When using the status field, tags are automatically assigned:
StatusTag Added
successecomdrop-processed
completedecomdrop-completed
pendingecomdrop-pending
errorecomdrop-error
failedecomdrop-error

Response Format

{
  "success": true,
  "message": "Tags added successfully: ecomdrop-processed",
  "orderId": "gid://shopify/Order/1234567890",
  "tags": ["ecomdrop-processed"]
}

Testing the Callback

Using cURL

curl -X POST https://your-app-url.com/api/ecomdrop/callback \
  -H "Content-Type: application/json" \
  -d '{
    "orderName": "#1001",
    "apiKey": "your_ecomdrop_api_key",
    "status": "success",
    "tag": "test-processed"
  }'

Using Postman

1

Create POST Request

Method: POST
URL: https://your-app-url.com/api/ecomdrop/callback
2

Set Headers

Content-Type: application/json
3

Add Body

{
  "orderName": "#1001",
  "apiKey": "your_api_key",
  "status": "success"
}
4

Send Request

Verify the order in Shopify receives the tag

Authentication & Security

The callback endpoint validates:
  1. API Key Match - The provided API key must exist in the database
  2. Shop Verification - API key must belong to the correct shop
  3. Session Active - Shopify app must be installed on the shop
The endpoint returns HTTP 200 even for errors to prevent Shopify from retrying failed webhooks. Check the response body for actual status.

Error Handling

Common Errors

Cause: The API key doesn’t match any configured shop
Solution: Verify the API key in your app configuration matches what Ecomdrop is sending
Cause: The order name doesn’t exist in the shop
Solution: Ensure the orderName format is correct (e.g., #1001)
Cause: App is not installed on the shop
Solution: Reinstall the app on the Shopify store
Cause: App not approved for protected customer data access
Solution: This will work after app publication and Shopify approval

Rate Limiting

The app implements a 1-minute cache for flow listings to prevent rate limiting:
// Flows are cached for 60 seconds
const CACHE_DURATION = 60000; // 1 minute
Flows are automatically refreshed when you navigate to the configuration page after the cache expires.

Best Practices

  1. Use Callbacks - Always configure callback URLs to handle async processing
  2. Monitor Tags - Set up Shopify Flow rules to act on Ecomdrop tags
  3. Test Thoroughly - Use the test endpoints before going live
  4. Handle Errors - Monitor for ecomdrop-error tags and investigate
  5. Secure API Keys - Rotate API keys periodically for security

Code Reference

Integration code location in source:
  • API Client: app/lib/ecomdrop.api.server.ts:31
  • Callback Handler: app/routes/api.ecomdrop.callback.tsx:22
  • Webhook Handler: app/routes/webhooks.orders.create.tsx:7

Support

If you encounter issues:
  1. Check server logs for detailed error messages
  2. Verify API key is correctly configured in both systems
  3. Ensure callback URL is accessible from Ecomdrop servers
  4. Test with the manual callback endpoints first

Build docs developers (and LLMs) love