Skip to content

Latest commit

 

History

History
126 lines (85 loc) · 4.29 KB

File metadata and controls

126 lines (85 loc) · 4.29 KB
title description sidebarTitle
Setting Up Shopify Integration
Configure Shopify integration to track orders and customer information from Chatwoot
Shopify

Setting up Chatwoot Shopify integration involves these steps.

  1. Create the app (Partner Dashboard) or create it via the Shopify CLI.
  2. Initialize/link the app locally using the Shopify CLI.
  3. Edit shopify.app.toml to use your Chatwoot URL and callback.
  4. Deploy the app configuration with the Shopify CLI.
  5. In Chatwoot Super Admin, set the Shopify Client ID and Client Secret.
  6. Enable the shopify_integration feature for your account.
  7. In Chatwoot, go to Integrations → Shopify and click Connect.

Register and configure the Shopify app (CLI)

Shopify app configuration is managed via the Shopify CLI (config-as-code). See the Shopify docs for details: https://shopify.dev/docs/apps/build/dev-dashboard/migrate-from-partners#use-cli-managed-app-configuration

You can still create the app in the Shopify Partner Dashboard, then link and update it via the CLI.

  1. Create the app in the Partner Dashboard:

shopify_app_create

  1. Install the Shopify CLI: https://shopify.dev/docs/api/shopify-cli

  2. Initialize/link the app locally via CLI:

Existing app flow (recommended if you created it in the Partner Dashboard):

shopify login                      # authenticate to your Partner org
shopify app init                   # create project and select existing app when prompted

Create a new app entirely via CLI (alternative):

shopify login                      # authenticate to your Partner org
shopify app init                   # choose to create a new app when prompted
  1. Edit the shopify.app.toml file to point to your Chatwoot instance.

Example shopify.app.toml (replace placeholders):

# Learn more about configuring your app at https://shopify.dev/docs/apps/tools/cli/configuration

client_id = "<your_shopify_app_client_id>"
name = "<your_app_name>"
application_url = "https://<your-chatwoot-self-hosted-domain>"
embedded = true

[build]
automatically_update_urls_on_dev = true

[webhooks]
api_version = "2025-10"

[access_scopes]
# Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes
scopes = "read_customers,read_orders"
optional_scopes = []
use_legacy_install_flow = false

[auth]
redirect_urls = ["https://<your-chatwoot-self-hosted-domain>/shopify/callback"]

After editing, deploy or update configuration via the CLI:

shopify app deploy
  1. After deploy, find your Client ID and Client Secret in the Dev Dashboard: https://dev.shopify.com/dashboard → Apps → your app (for example, Chatwoot) → Settings.

Configure Chatwoot (Super Admin)

In your Chatwoot installation, navigate to Super Admin → Settings → Shopify and set:

  • SHOPIFY_CLIENT_ID
  • SHOPIFY_CLIENT_SECRET

Note: If you created the app via the CLI (new app flow), the Client ID and Client Secret will be available only after the first successful shopify app deploy.

Ensure the environment variable FRONTEND_URL is set for the Chatwoot web process to your public URL (for example, https://<your-chatwoot-self-hosted-domain>), then restart the service.

Enable the Shopify integration for your account

Open the Rails console on your server, then enable the feature:

# SSH into your server, then switch to the chatwoot user and app directory
sudo -i -u chatwoot
cd ~/chatwoot

# Start Rails console in production
RAILS_ENV=production bundle exec rails c

Enable the account feature flag shopify_integration:

To find your account ID quickly, run Account.first.id in the console.

account = Account.find(<ACCOUNT_ID>)
account.enable_features!("shopify_integration")

Restart the Chatwoot service if needed:

sudo systemctl restart chatwoot.target

Connect Chatwoot with your Shopify account

Go to Account → Settings → Integrations → Shopify and click Connect. Follow this guide to complete the Shopify integration: https://chatwoot.help/hc/user-guide/articles/1742395545-how-to-track-orders-with-shopify-integration

Shopify will appear in the Integrations section only after the account feature `shopify_integration` is enabled and `SHOPIFY_CLIENT_ID` is configured. Both are required for visibility.