UChat Official

Introduction

This guide explains how to automate order confirmation messages by integrating Shopify webhooks with UChat.

By setting up a webhook, you can receive real-time order data, map relevant information, and send personalized confirmation messages to customers.

This process enhances customer experience and streamlines order management.

Step-by-Step Process

1. Create a Webhook in Shopify

  • Navigate to Settings (bottom left corner).

  • Select Notifications.

  • Scroll to Webhook Overview.

  • Click Create Webhook.

  • Choose Event: Order Creation.

  • Set Format: JSON.

  • Enter URL: (from UChat webhook setup).

  • Select API Version: Latest.

  • Save the webhook.

2. Configure Webhook in YouChat

  • Go to Tools > Inbound Webhooks.

  • Click Create New Inbound Webhook.

  • Name your webhook and save.

  • Click Edit to get the Webhook URL.

  • Copy this URL and paste it into Shopify webhook settings.

  • Save changes.

3. Test the Integration

  • Initiate a test payment in Shopify.

  • Complete checkout and wait for the Thank You page.

  • Confirm that webhook data is received in UChat.

  • Review the payload to ensure all order details are captured.

4. Map Data Points

  • Use the received JSON payload to match customer data with chatbot user profiles.

  • Add a note during draft order creation containing the user's Chat ID.

  • Extract JSON paths for key data:

    Data Point

    JSON Path

    Purpose

    User ID

    notes

    Identify user in chatbot

    Order ID

    order.id

    Track order internally

    Customer ID

    customer.id

    Map customer profile

    Subtotal

    order.subtotal_price

    Display order amount

    Products

    line_items

    List purchased items

  • Map these points to custom fields or variables in your chatbot.

5. Activate Webhook & Subflow

  • Enable the webhook.

  • Assign a subflow for Order Confirmation.

  • Design a message template:

    "We've received your order! Your Order ID is {order_id}. Total: {subtotal}. We will notify you once shipped."

  • Include shipping details and tracking info via OTN (Order Tracking Number) if needed.

6. Send Confirmation & Support Messages

  • When order is fulfilled, trigger the chatbot to send the confirmation message.

  • For delayed shipments, use OTN requests to provide tracking updates.

  • Set up live chat or support flows for customer inquiries.

  • Tag users with order completed status to facilitate abandoned cart recovery.

Final Tips and Next Steps

  • Ensure data accuracy by testing webhook payloads thoroughly.

  • Use custom fields to store detailed order info for future reference.

  • Automate support flows for order issues or cancellations.

  • Regularly update webhook URLs and API versions to maintain compatibility.

  • Explore abandoned cart recovery by tagging users and triggering follow-up flows.