Skip to main content

Shopify Integration Template

Integrate the Shopify e-commerce platform into your Mid-call Actions and enable your AI assistant to retrieve order details, check shipping status, and perform order management during customer conversations.

Overview & Features

Order Management

  • Real-time access to order details and status
  • Shipping and fulfillment tracking
  • Customer information and order history
  • Inventory and product availability checks

Customer Service Excellence

  • Instant order status updates
  • Returns and refund management
  • Upselling and cross-selling opportunities
  • Proactive problem resolution

Shopify Admin API Setup

1. Shopify App & API Access

1

Create Private App

  • Log in as admin to your Shopify store
  • Navigate to “Apps” → “App and sales channel settings”
  • Click “Develop apps” → “Create an app”
  • App name: “Famulor Mid-Call Integration”
2

Admin API Permissions

Required API scopes:
  Orders:
    - read_orders (for order details)
    - write_orders (for order updates)
  
  Customers:
    - read_customers (for customer info)
    
  Products:
    - read_products (for product details)
    
Optional for advanced features:
  - read_inventory (inventory levels)
  - read_fulfillments (shipping details)
  - read_shipping (shipping options)
3

Generate Access Token

Token generation:
  1. "Admin API access token" → "Install app"
  2. Copy the access token (very long)
  3. Store the token securely as {{SHOPIFY_ACCESS_TOKEN}}
  4. Note the store name as {{SHOPIFY_STORE}} (without .myshopify.com)
4

API Version & Endpoints

  • Use the current API version: 2024-01
  • Base URL: https://store-name.myshopify.com/admin/api/2024-01/
  • Observe rate limits: 2 calls/second (standard plan)

Configure Mid-call Action

Configuration in the Famulor Interface

FieldValue
Name*Shopify Bestellung abrufen
Description”Fetches detailed order information from Shopify for customer service and order management”
Function Name*get_shopify_order
Function Description*“Retrieves details of an order from Shopify. Use this when customers ask about order status, shipping info, or product details of their orders.”
HTTP MethodGET
Timeout (ms)5000
Endpoint*https://{{SHOPIFY_STORE}}.myshopify.com/admin/api/2024-01/orders/{order_id}.json

Advanced Parameter Schema

{
  "type": "object", 
  "properties": {
    "order_id": {
      "type": "string",
      "description": "Shopify order ID or order name",
      "examples": ["12345678", "#1001", "1234567890123"]
    },
    "include_fulfillments": {
      "type": "boolean",
      "description": "Include fulfillment details?",
      "default": true
    },
    "include_transactions": {
      "type": "boolean", 
      "description": "Include payment transaction details?",
      "default": false
    }
  },
  "required": ["order_id"]
}

Practical Use Cases

Scenario 1: Order Status Inquiry

Typical customer service conversation:
Customer: "Where is my order #1001?"

AI: "I am looking up order #1001..."

get_shopify_order:
  order_id: "1001"

Response integration:
  "Your order #1001 for €149.99 was shipped on January 12th. 
   The shipment contains 2 items and should arrive tomorrow. 
   The tracking number is DHL123456789."
Delayed Delivery:
Shopify response analysis:
  fulfillment_status: "unfulfilled"
  days_since_order: 5
  expected_shipping: "1-2 business days"
  
Proactive communication:
  "I see your order is delayed. I'm sorry about that! 
   We usually ship within 1-2 business days. 
   I am escalating this to our fulfillment team and you will 
   get an update today."

Automatic actions:
  - Notify fulfillment team
  - Trigger customer compensation workflow
  - Shipping delay analysis for process improvement

Scenario 2: Upselling & Cross-Selling

Customer purchase pattern:
  
Historical orders analysis:
  - Frequently bought together products
  - Average order value trends
  - Seasonal purchase patterns
  - Category preferences

Real-time recommendations:
  When customer asks about order:
    "Your order for the laptop stand arrives tomorrow. 
     By the way, many customers also buy our ergonomic 
     mouse pad. Are you interested?"

Shopify Response Processing

Full Order Response

{
  "order": {
    "id": 12345678,
    "name": "#1001",
    "email": "max@beispiel.de",
    "created_at": "2024-01-12T10:30:00-05:00",
    "updated_at": "2024-01-12T14:20:00-05:00",
    "total_price": "149.99",
    "subtotal_price": "124.99", 
    "tax_lines": [{"price": "25.00", "rate": 0.2, "title": "VAT"}],
    "currency": "EUR",
    "financial_status": "paid",
    "fulfillment_status": "fulfilled",
    "customer": {
      "id": 987654321,
      "first_name": "Max",
      "last_name": "Mustermann",
      "email": "max@beispiel.de",
      "phone": "+49123456789",
      "total_spent": "1249.85",
      "orders_count": 8
    },
    "shipping_address": {
      "first_name": "Max",
      "last_name": "Mustermann", 
      "address1": "Musterstraße 123",
      "city": "Munich",
      "zip": "80331",
      "country": "Germany"
    },
    "line_items": [
      {
        "id": 123456,
        "title": "Ergonomic Laptop Stand",
        "quantity": 1,
        "price": "124.99",
        "sku": "STAND-ERG-001"
      }
    ],
    "fulfillments": [
      {
        "id": 456789,
        "status": "success",
        "tracking_company": "DHL",
        "tracking_number": "DHL123456789",
        "tracking_url": "https://tracking.dhl.de/..."
      }
    ]
  }
}

Natural Language Response

Template: "Order {{order_number}} for {{customer_name}}, total amount: {{total}}, status: {{status}}"Enhanced Customer Communication:
Full information:
  "Hello Mr. {{customer_name}}! Your order {{order_number}} 
   for €{{total}} has {{#if fulfillment_status}}already shipped{{else}}been prepared{{/if}}.
   
   {{#if tracking_number}}
   The shipment is with DHL and has the tracking number {{tracking_number}}.
   {{/if}}
   
   {{#if financial_status == 'paid'}}
   The payment has been confirmed.
   {{else}}
   The payment is still being processed.
   {{/if}}"
Context-aware responses:
  
If fulfillment_status == "unfulfilled":
  "Your order is currently being prepared for shipping. 
   Given current order volumes, this takes about 1-2 business days."
  
If days_since_order > 5 AND status == "unfulfilled":
  "This is taking unusually long. I will check immediately 
   what's going on and you will receive an update within an hour."
  
If customer.orders_count > 10:
  "As a loyal customer with {{orders_count}} orders, you of course 
   have priority. How can I assist you today?"

Performance & Analytics

E-Commerce Service KPIs

MetricDescriptionTarget
Order Lookup Success Rate% of successful Shopify queries>98%
Customer Service Resolution% of order inquiries resolved immediately>85%
Cross-sell Conversion% of additional purchases via mid-call offers>12%
Customer SatisfactionRating after order service calls>4.7/5

Advanced Shopify Features

Multi-Store Management

Multi-store configuration:
  
Regional stores:
  EU Store: "shop-eu.myshopify.com"
  US Store: "shop-us.myshopify.com" 
  UK Store: "shop-uk.myshopify.com"
  
Automatic store detection:
  - Customer phone number → region detection
  - Order ID pattern → store identification
  - Currency preference → store routing
B2B order features:
  - Company account management
  - Bulk order tracking
  - Custom pricing tiers
  - Purchase order numbers
  
Integration enhancements:
  - Include company name in customer communication
  - Bulk discount calculations
  - B2B-specific order status messages
  - Account manager assignment logic

API Rate Limits: The Shopify API enforces strict rate limits (2 calls/second standard, 4 calls/second Shopify Plus). Implement smart caching for frequently queried orders.
Customer Service Tip: Use the customer total spent and orders count from the API for personalized communication and VIP treatment decisions.