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

Flows are automated workflows in Ecomdrop that trigger customer communications based on Shopify events. The connector supports two primary flow types:
  1. Nuevo Pedido (New Order) - Triggered when a customer completes a purchase
  2. Carrito Abandonado (Abandoned Cart) - Triggered when a draft order is created

Prerequisites

Before configuring flows, you must set up your Ecomdrop API key in the store settings.
1

Configure API Key

Navigate to Configuration > Ecomdrop and enter your API key
2

Verify Flow Loading

After saving, the app automatically fetches available flows from your Ecomdrop account
3

Assign Flows

Select which flows should trigger for each event type

Flow Types

New Order Flow (Nuevo Pedido)

This flow triggers when a customer completes an order in your Shopify store. Webhook Trigger: ORDERS_CREATE (GraphQL) Event Data Sent:
orderId
string
required
Shopify order GID (e.g., gid://shopify/Order/123456)
orderName
string
required
Order display name (e.g., #1001)
totalPrice
string
Order total price (decimal string)
currency
string
Currency code (e.g., USD, COP)
customer
object
Customer information including:
  • id - Customer ID
  • email - Customer email
  • firstName - First name
  • lastName - Last name
  • phone - Phone number
lineItems
array
Array of ordered products with:
  • title - Product name
  • quantity - Quantity ordered
  • price - Unit price
  • sku - Product SKU
  • variantId - Variant identifier
shippingAddress
object
Delivery address details
eventType
string
Always "order_created" for new orders

Abandoned Cart Flow (Carrito Abandonado)

This flow triggers when a draft order is created, which can represent an abandoned cart. Webhook Trigger: DRAFT_ORDERS_CREATE (GraphQL) Event Data Sent:
draftOrderId
string
required
Shopify draft order GID
draftOrderName
string
required
Draft order name/number
totalPrice
string
Cart total value
currencyCode
string
Currency code
customer
object
Customer information (if available)
lineItems
array
Products in the cart
email
string
Customer email for recovery
eventType
string
Always "draft_order_created" for abandoned carts

Setting Up Flows

Step 1: Access Flow Configuration

1

Navigate to Configuration

Open the Configuration page in your Shopify app admin
2

Select Ecomdrop Tab

Click on the “Ecomdrop” tab in the configuration interface
3

Scroll to Flow Configuration

Find the “Configuración de Flujos” section (appears only after API key is configured)

Step 2: Assign Flow for New Orders

1

Select Flow

In the “Nuevo Pedido” dropdown, choose the flow you want to trigger when orders are created
2

Review Flow

Ensure the selected flow is designed for order confirmations or post-purchase communications
3

Save

The assignment is saved when you click “Guardar Configuración de Flujos”
Only flows available in your Ecomdrop account will appear in the dropdown.

Step 3: Assign Flow for Abandoned Carts

1

Select Flow

In the “Carrito Abandonado” dropdown, choose the appropriate recovery flow
2

Verify Flow Logic

Make sure the flow contains cart recovery messaging and incentives
3

Save Configuration

Click the save button to activate the abandoned cart flow
Draft order webhooks trigger for ALL draft orders, not just abandoned carts. Design your flows accordingly.

Flow Data Structure

Flows are retrieved from Ecomdrop with the following structure:
interface EcomdropFlow {
  id: string;              // Unique flow identifier
  name: string;            // Display name
  description?: string;    // Optional description
  status?: string;         // Flow status (active/inactive)
  createdAt?: string;      // Creation timestamp
  updatedAt?: string;      // Last update timestamp
}

Flow Caching

To optimize performance and reduce API calls:
  • Cache Duration: 60 seconds (1 minute)
  • Storage: In-memory cache keyed by API key
  • Cache Invalidation: Automatic on API key update
  • Manual Refresh: Click “Actualizar Conexión y Refrescar Flujos”

Clearing Flow Cache

The cache is automatically cleared when:
  1. You update your Ecomdrop API key
  2. You click the “Sync Flows” button (if available)
  3. The cache expires after 60 seconds
Manual Cache Clear:
POST /app/configuration
intent=sync_flows

Testing Flows

Testing New Order Flow

1

Create Test Order

In your Shopify admin, create a test order:
  • Go to Orders > Create order
  • Add products and customer information
  • Complete the order
2

Monitor Webhook

Check your app logs for webhook processing:
📦 Received ORDERS_CREATE webhook for your-store.myshopify.com
🔍 Looking for configuration with shop: your-store.myshopify.com
✅ API Key exists: Yes
✅ Flow ID exists: Yes
🚀 Triggering Ecomdrop flow <flow-id> for order #1001
✅ Successfully triggered flow for order #1001
3

Verify in Ecomdrop

Log into your Ecomdrop panel and verify the flow was triggered with the correct data

Testing Abandoned Cart Flow

1

Create Draft Order

In Shopify admin:
  • Go to Orders > Drafts
  • Create a new draft order
  • Add products and customer email
  • Save the draft (don’t send invoice)
2

Check Logs

Monitor for draft order webhook:
📝 Received DRAFT_ORDERS_CREATE webhook for your-store.myshopify.com
🚀 Triggering Ecomdrop flow <flow-id> for draft order #D1
✅ Successfully triggered flow for draft order #D1
3

Confirm Execution

Check Ecomdrop panel for flow execution and customer communication
Webhook processing happens asynchronously. Allow a few seconds for the flow to trigger.

Flow Triggering Logic

The flow triggering process follows these steps:
1

Webhook Receipt

Shopify sends webhook to /webhooks/orders/create or /webhooks/draft_orders/create
2

Configuration Lookup

App retrieves store configuration from database using shop domain
3

Validation

Checks for:
  • Valid Ecomdrop API key
  • Assigned flow ID for the event type
4

Data Formatting

Transforms Shopify webhook payload into Ecomdrop-compatible format
5

API Call

Posts to Ecomdrop API: POST /api/flows/{flowId}/trigger
6

Response Handling

Logs success/failure and updates order tags if needed

Advanced Configuration

Callback URLs

For order flows, the app can configure a callback URL for Ecomdrop to notify when processing completes:
{
  callbackUrl: "https://your-app.com/api/ecomdrop/callback",
  callbackApiKey: "your_api_key"
}
Callback functionality requires SHOPIFY_APP_URL environment variable to be set.

Order Tagging

When a flow fails to trigger, the app automatically tags the order with ecomdrop-error for easy identification and reprocessing.

Troubleshooting

Problem: Dropdown is empty after entering API keySolutions:
  1. Verify API key is correct
  2. Check Ecomdrop account has active flows
  3. Review console logs for API errors
  4. Wait 60 seconds and refresh (cache expiry)
  5. Click sync/refresh flows button
Problem: Order created but flow doesn’t executeSolutions:
  1. Check Configuration > Status tab to verify flow assignment
  2. Review app logs for webhook processing
  3. Verify webhooks are registered in Shopify settings
  4. Ensure the flow is active in Ecomdrop
  5. Check for errors in Ecomdrop panel logs
Problem: Flow receives incorrect or missing dataSolutions:
  1. Check webhook payload in app logs
  2. Verify GraphQL webhook format compatibility
  3. Ensure customer information is complete in Shopify
  4. Review data transformation in webhooks.orders.create.tsx
Problem: Flow triggers multiple times for one orderSolutions:
  1. Check Shopify webhook history for duplicates
  2. Verify app deployment (avoid multiple instances)
  3. Review Ecomdrop flow configuration for loops
  4. Check for manual flow triggers in Ecomdrop panel

Best Practices

Test Before Production

Always test flows with draft orders before going live with customer orders

Monitor Logs

Regularly check app logs to ensure webhooks are processing correctly

Design for Failures

Build flows that handle missing or incomplete customer data gracefully

Use Clear Names

Name your Ecomdrop flows clearly to distinguish between order types and purposes

API Reference

Get Flows

GET https://panel.ecomdrop.app/api/accounts/flows
Headers:
  X-ACCESS-TOKEN: your_api_key
Response:
[
  {
    "id": "flow_123",
    "name": "Order Confirmation Flow",
    "status": "active"
  }
]

Trigger Flow

POST https://panel.ecomdrop.app/api/flows/{flowId}/trigger
Headers:
  X-ACCESS-TOKEN: your_api_key
  Content-Type: application/json

Body: { /* order or draft order data */ }

Next Steps

Store Settings

Configure your API keys and integration credentials

Webhooks

Learn about webhook endpoints and event handling

Build docs developers (and LLMs) love