All Examples
๐Ÿ“ฆ

Order Updates

Proactive status calls to customers

Overview

Automatically call customers with order updates, delivery notifications, and issue alerts. Proactive communication reduces inbound support calls.

Benefits

  • Reduce 'where is my order?' calls by 60%
  • Proactively resolve delivery issues
  • Reschedule deliveries conversationally
  • Higher customer satisfaction scores

Example Conversation

AI Agent

Hi, this is a delivery update call from QuickShip Logistics. Am I speaking with Jennifer about order #78432?

Caller

Yes, that's me.

AI Agent

Great! I'm calling to confirm your delivery scheduled for tomorrow, Thursday, between 2 PM and 6 PM. Will someone be available to receive the package at 123 Main Street?

Caller

Actually, I won't be home then. Can we change it to Friday instead?

AI Agent

Of course! I can reschedule for Friday. Do you prefer morning, afternoon, or evening delivery?

Caller

Morning would be perfect.

โ†’ reschedule_delivery({order_id: 'ORD-2024-78432', new_date: '2024-01-19', new_time_preference: 'morning', reason: 'Customer not available on original date'})
AI Agent

I've rescheduled your delivery for Friday, January 19th, between 8 AM and 12 PM. You'll receive a text confirmation shortly. Any special delivery instructions?

Caller

Yes, please leave it at the back door.

โ†’ confirm_delivery({order_id: 'ORD-2024-78432', confirmed_date: '2024-01-19', time_window: '8am-12pm', special_instructions: 'Leave at back door'})
AI Agent

Notedโ€”we'll leave it at the back door. Your delivery is confirmed for Friday morning. Is there anything else I can help with?

Caller

No, that's all. Thank you!

AI Agent

You're welcome! Have a great day, and enjoy your order!

1. System Prompt

Configure your AI agent's personality and behavior.

system_prompt.txt
You are calling from QuickShip Logistics to provide an order update. You have the following order information:

Order: #{{ORDER_ID}}
Customer: {{CUSTOMER_NAME}}
Status: {{ORDER_STATUS}}
Estimated Delivery: {{DELIVERY_DATE}}
Items: {{ITEMS}}

Purpose of call:
- Confirm delivery time window
- Verify delivery address
- Handle any special instructions
- Reschedule if needed

Be proactive, helpful, and efficient. If there's an issue (delay, missing item), apologize and offer solutions.

2. Tools / Functions

Define the actions your AI agent can perform.

get_order_details()

Fetch current order status and details

Parameters

{
            "order_id": string - The order ID
        }

Example Call

get_order_details({"order_id": "ORD-2024-78432"})

confirm_delivery()

Confirm the delivery time and address with the customer

Parameters

{
            "order_id": string - The order ID,
            "confirmed_date": string - Confirmed delivery date,
            "time_window": string - Delivery time window (e.g., '2pm-6pm'),
            "special_instructions": string (optional) - Any delivery instructions
        }

Example Call

confirm_delivery({"order_id": "ORD-2024-78432", "confirmed_date": "2024-01-16", "time_window": "2pm-6pm", "special_instructions": "Leave at back door"})

reschedule_delivery()

Reschedule delivery to a new date

Parameters

{
            "order_id": string - The order ID,
            "new_date": string - New delivery date,
            "new_time_preference": string - morning, afternoon, or evening,
            "reason": string - Reason for reschedule
        }

Example Call

reschedule_delivery({"order_id": "ORD-2024-78432", "new_date": "2024-01-18", "new_time_preference": "morning", "reason": "Customer not available on original date"})

update_address()

Update the delivery address

Parameters

{
            "order_id": string - The order ID,
            "new_address": string - Complete new delivery address,
            "address_type": string - residential or business
        }

Example Call

update_address({"order_id": "ORD-2024-78432", "new_address": "456 Oak Ave, Suite 200, Chicago IL 60601", "address_type": "business"})

report_issue()

Report a delivery issue and create support ticket

Parameters

{
            "order_id": string - The order ID,
            "issue_type": string - damaged, missing_item, wrong_item, not_delivered,
            "description": string - Details of the issue,
            "resolution_preference": string - refund, replacement, or reship
        }

Example Call

report_issue({"order_id": "ORD-2024-78432", "issue_type": "damaged", "description": "Box was crushed, item inside broken", "resolution_preference": "replacement"})

3. Webhook Handler

Handle tool calls from SIP4AI in your backend.

webhook.js
app.post('/webhook/orders', async (req, res) => {
  const { tool_name, parameters, call_id } = req.body;
  
  switch (tool_name) {
    case 'get_order_details':
      const order = await db.orders.findById(parameters.order_id);
      const tracking = await shipping.getTracking(order.tracking_number);
      return res.json({
        order_id: order.id,
        status: tracking.status,
        estimated_delivery: tracking.estimated_delivery,
        current_location: tracking.current_location,
        items: order.items,
        address: order.shipping_address
      });
      
    case 'confirm_delivery':
      await db.orders.update(parameters.order_id, {
        delivery_confirmed: true,
        confirmed_date: parameters.confirmed_date,
        time_window: parameters.time_window,
        special_instructions: parameters.special_instructions
      });
      
      // Update delivery driver app
      await driverApp.updateDelivery(parameters.order_id, {
        instructions: parameters.special_instructions
      });
      
      // Send SMS confirmation
      await twilio.messages.create({
        to: order.customer_phone,
        body: `Delivery confirmed for ${parameters.confirmed_date} between ${parameters.time_window}`
      });
      
      return res.json({ success: true, confirmed: true });
      
    case 'reschedule_delivery':
      const newSlot = await shipping.reschedule({
        order_id: parameters.order_id,
        date: parameters.new_date,
        time_preference: parameters.new_time_preference
      });
      
      await db.orders.update(parameters.order_id, {
        delivery_date: newSlot.date,
        time_window: newSlot.time_window,
        reschedule_reason: parameters.reason
      });
      
      return res.json({
        success: true,
        new_date: newSlot.date,
        new_time_window: newSlot.time_window
      });
      
    case 'update_address':
      // Validate address
      const validated = await addressValidator.validate(parameters.new_address);
      if (!validated.valid) {
        return res.json({ success: false, error: 'Invalid address', suggestions: validated.suggestions });
      }
      
      await db.orders.update(parameters.order_id, {
        shipping_address: validated.formatted_address,
        address_type: parameters.address_type
      });
      
      return res.json({ success: true, formatted_address: validated.formatted_address });
      
    case 'report_issue':
      const ticket = await db.support_tickets.create({
        order_id: parameters.order_id,
        type: parameters.issue_type,
        description: parameters.description,
        resolution_preference: parameters.resolution_preference,
        priority: 'high',
        status: 'open'
      });
      
      // Auto-process refunds/replacements for certain issue types
      if (parameters.resolution_preference === 'replacement') {
        await fulfillment.createReplacementOrder(parameters.order_id);
      }
      
      return res.json({
        success: true,
        ticket_id: ticket.id,
        message: `Ticket #${ticket.id} created. ${parameters.resolution_preference} will be processed within 24 hours.`
      });
  }
});

More Examples

Ready to build your Order Updates?

Get started with SIP4AI in minutes. Self-host it, connect your SIP line, and deploy your AI agent.