UChat Official

Introduction

This detailed overview explains how to seamlessly integrate Shopify into your chatbot, enabling a smooth shopping experience directly within the chat interface.

By leveraging specific action blocks, you can showcase products, manage collections, handle cart operations, and facilitate checkout—all without leaving the chat environment.

This guide covers the entire process, from fetching collections to order confirmation, ensuring you can build a fully functional e-commerce chatbot.

Step-by-Step Shopify Integration Workflow

1. Initiating Shopify Integration

  • Access the action block within your chatbot flow.

  • Select Add Items and choose Shopify.

  • Once activated, you'll see multiple actions such as:

    • Search for customers

    • Get customer info

    • Customer orders

    • Search for products

    • Get product info

    • Get product images

    • Get product variants

2. Building a Product Showcase Template

  • The template simplifies displaying products inside your chatbot.

  • When a user clicks "Shop Now", the flow triggers the smart collections action.

  • Filtering fields are pre-configured to limit JSON size (max 20,000 characters), ensuring data remains manageable.

  • Sample data is returned, which you can map to your desired fields (images, titles, descriptions).

  • Use a "Send Message" block combined with a "For Each" loop to iterate through collections.

  • Map collection images, titles, and descriptions dynamically, allowing users to browse collections visually.

3. User Selection and Collection Handling

  • Implement a "Select" option on each collection button.

  • When a user selects a collection, store this choice in a "select item" field.

  • Proceed to search for products within the selected collection using the collection ID.

  • Map the collection ID from the stored selection to fetch relevant products.

4. Displaying Products

  • Use the search for products action, filtering by collection ID.

  • The returned JSON includes product details: title, ID, description, images.

  • Loop through products with a "For Each" block, mapping images, titles, and descriptions for display.

  • Users can add products to their cart, with options to specify quantities.

5. Handling Variants and Quantities

  • Count product variants to determine if multiple options exist.

  • If more than one variant, display all variants for user selection.

  • If only one variant, directly ask the user for quantity.

  • Store selected variant info in a "selected variant" field.

  • Add the chosen product/variant to the cart, confirming the addition with a message.

6. Cart Management

  • Show cart contents in a gallery overview.

  • Allow users to remove items or proceed to checkout.

  • For removal, identify items via variant ID and update the cart accordingly.

  • When ready, generate a draft order in Shopify, creating a checkout URL.

7. Checkout and Order Confirmation

  • Present a "Checkout" button linked to the generated checkout URL.

  • After payment, users are redirected to Shopify’s thank you page.

  • Automate order confirmation via webhooks, sending confirmation messages through the chatbot.

Final Thoughts and Next Steps

This integration empowers your chatbot to deliver a full-fledged shopping experience—from browsing collections to completing orders—without requiring users to leave the chat.

The process is designed to be user-friendly, with pre-configured templates and mappings that simplify setup.

By automating cart management, variant selection, and checkout, you can significantly enhance customer engagement and streamline sales.

Next Steps:

  • Test the entire flow with sample data.

  • Customize product fields and messaging to match your branding.

  • Enable webhook integrations for order updates and confirmations.

  • Explore advanced filtering and personalization options to optimize the shopping experience further.

With this setup, your chatbot becomes a powerful sales tool, providing a seamless, interactive shopping journey that can boost conversions and improve customer satisfaction.