Embeds & API

    Using Shopify Deep Integration

    7 min read

    Overview

    Overview

    AI Chat for Business offers a deep Shopify integration that lets your chatbot act as a Shopify-aware sales and support assistant. With this integration, your bot can safely create discount codes, submit order cancellation requests for review, surface real-time cart previews to agents, and route sensitive e‑commerce actions through a robust approval and audit workflow.

    The integration is designed to balance automation and control. Your AI bot handles routine tasks and customer requests, while your team retains final authority over high-impact actions like order cancellations and, optionally, discounts. All activity is recorded in a centralized Shopify audit log for full transparency.

    This guide explains each capability in detail, including AI-powered discount creation, order cancellation requests, agent approval workflow, real-time cart previews, and how to review Shopify audit logs inside AI Chat for Business.

    How It Works

    How It Works
    AI-powered discount codes

    When a customer asks for a discount in chat and discount creation is enabled, the bot:
    1. Checks whether Create Discount is enabled in your Shopify Bot Actions settings.
    2. Verifies that the Daily Limit of discount codes has not been reached.
    3. Calculates a discount that does not exceed your configured Max Discount %.
    4. Either submits the action for approval (if Require Approval is enabled) or auto-creates the discount in Shopify.
    5. Shares the unique discount code with the customer once it is created or approved.


    The bot never exceeds the maximum discount percentage you define and stops issuing new codes once the daily limit is reached.
    Order cancellation requests

    When a customer requests an order cancellation through the bot:
    1. The bot verifies that the referenced order exists in Shopify.
    2. The bot confirms that the order matches the customer’s email address.
    3. If Cancel Orders is enabled, the bot submits a cancellation request that appears in the Agent Inbox.
    4. The request always requires human approval, regardless of other settings.


    Agents review the order details and decide whether to approve or reject the cancellation. No order is ever cancelled automatically by the bot.
    Real-time cart preview

    When a customer with an active Shopify cart is chatting with your team, the Agent Inbox sidebar can show a live cart preview. This works automatically once Shopify is connected and includes:
    • Items currently in the cart
    • Quantities and variants
    • The current cart total


    Agents can use this context to provide more relevant support, suggest upsells, or decide when to approve a discount.
    Agent approval workflow

    Any Shopify action that requires approval appears as a pending item in the Agent Inbox:
    • The notification bell displays the number of pending actions.
    • Agents click to open the list of pending Shopify actions.
    • Each action shows relevant details, such as order information or discount parameters.
    • Agents approve or reject with a single click.


    Approved actions are executed immediately. Rejected actions are recorded as rejected in the audit log.
    Shopify audit logging

    Every Shopify-related action is captured in the Audit Log for your connected store. The log records:
    • Timestamp of the action
    • Whether it was performed by the bot or an agent
    • The outcome (approved, rejected, or auto-approved)
    • Details about the discount or order involved


    You can view audit logs by going to Integrations → Shopify, selecting your store, and opening the Audit Log tab. Filters let you narrow events by action type, date range, or outcome.

    Configuration

    Configuration
    Accessing Shopify bot actions

    To configure how your AI Chat for Business bot interacts with Shopify:
    1. Go to Integrations → Shopify.
    2. Select your connected Shopify store.
    3. Click the Bot Actions tab.


    From this tab, you can enable or disable Shopify actions and set limits for discounts and cancellations.
    Available settings

    The following settings control Shopify deep integration behavior:
    SettingDescriptionDefault
    Create DiscountAllow bot to create discount codesDisabled
    Max Discount %Maximum percentage discount allowed10%
    Daily LimitMax discounts per day10
    Require ApprovalRequire agent approval for discountsYes
    Cancel OrdersAllow bot to submit cancellation requestsDisabled


    > Note: Order cancellation always requires approval regardless of settings. The Cancel Orders setting only controls whether the bot may submit cancellation requests at all.
    Viewing Shopify audit logs

    To review all Shopify-related actions taken by your bot and agents:
    1. Go to Integrations → Shopify.
    2. Select your store.
    3. Click the Audit Log tab.
    4. Use filters for action type, date range, or outcome to focus your review.


    The audit log is your source of truth for Shopify actions initiated by AI Chat for Business.

    Security Best Practices

    Security Best Practices

    Because Shopify actions can directly affect revenue, fulfillment, and customer satisfaction, follow these best practices when enabling deep integration features.
    Start with low limits

    Begin with conservative values for Max Discount % and Daily Limit. This allows you to:
    • Observe how the bot uses discounts in real conversations.
    • Prevent overly generous or frequent discounts while you fine-tune training.


    You can gradually increase limits once you are comfortable with the results.
    Enable approval mode initially

    Keep Require Approval enabled while you:
    • Validate that the bot only offers discounts in appropriate scenarios.
    • Confirm that discount amounts align with your promotion strategy.


    Approval mode ensures that every discount passes through a human review step before reaching the customer.
    Review audit logs regularly

    Make the Audit Log part of your regular operations review. Look for:
    • Unusual spikes in discount creation volume.
    • Repeated cancellation requests for the same orders.
    • Patterns where agents frequently reject bot-initiated actions.


    Regular audits help you detect misconfigurations early and improve your AI policies over time.
    Train your bot on policy

    Update your bot’s training and system prompt so it understands:
    • When it should consider offering a discount.
    • Situations where it should not offer discounts.
    • How to respond when limits or policies prevent a discount.


    This alignment between configuration and training leads to more consistent, policy-compliant behavior from your AI chatbot.

    Troubleshooting

    Troubleshooting
    Bot not offering discounts

    If your bot never offers discount codes:
    • Confirm that Create Discount is enabled in the Bot Actions tab.
    • Check that the Daily Limit has not already been reached for the current day.
    • Make sure your Shopify connection is active and not disconnected.


    If these settings are correct, open the Audit Log to see whether discount creation attempts are being blocked or rejected.
    Agent not seeing notifications

    If agents do not see pending Shopify actions in the Agent Inbox:
    • Verify that the agent has access to the Agent Inbox.
    • Confirm that the conversation is assigned to them or that they have organization-wide access.


    If access is correct, have the agent check the notification bell and pending actions list to ensure there are actions waiting for review.
    Discount code not working

    If a customer reports that a discount code from the bot is not working:
    1. Check the Audit Log to confirm that the code was created successfully.
    2. Look up the code in your Shopify admin to verify its status.
    3. Ensure the discount has not expired or been disabled.


    If the code is valid in Shopify but still fails at checkout, verify that it is being applied to eligible products and that no Shopify rule is preventing its use.

    Common Questions

    Ready to use Shopify automation?

    Connect your Shopify store to AI Chat for Business and start using AI-powered discounts, order cancellation requests, and real-time cart context today.

    Connect Shopify

    Related Content

    Deploy an AI-powered Instagram chatbot with AI Chat for Business to automate DMs, Story replies, and product questions while syncing data from Shopify.

    Read more

    Turn team expertise into a 24/7 AI assistant with Knowledge Interview. Train your bot through guided conversation instead of heavy documentation work.

    Read more

    Learn how to launch your first AI chatbot with AI Chat for Business, connect key channels like WhatsApp and Shopify, and scale from simple FAQs to full AI automation.

    Read more
    J
    Jack
    Online • Our AI Assistant
    Hi there! I'd love to learn more about your business needs and show you how we can help. What brings you here today?