Why Add UCP to Your Shopify Store?
The Universal Commerce Protocol (UCP) is an open standard that allows AI agents to discover, browse, and purchase from your store. With AI shopping assistants like ChatGPT, Google AI Mode, and Microsoft Copilot becoming mainstream, UCP-enabled stores have a significant advantage.
- AI Discovery: Your products appear in AI-powered shopping recommendations
- Autonomous Checkout: AI agents can complete purchases on behalf of customers
- Structured Data: Machine-readable product and policy information
- Future-Proof: Ready for the AI commerce revolution
Prerequisites
- A Shopify store (any plan)
- Admin access to your store
- Your store's domain (e.g.,
yourstore.myshopify.comor custom domain) - Basic understanding of your store's policies (returns, shipping, etc.)
Step-by-Step Implementation
First, use the UCP Tools generator to create a UCP profile customized for your store. This will create a JSON file with your store's capabilities, policies, and product information.
Generate Your UCP Profile
Enter your store details and we'll create a UCP-compliant profile for you.
Open Generator โWhen generating, you'll need:
- Your store name and description
- Store URL (your Shopify domain)
- Return policy URL (usually
/policies/refund-policy) - Shipping policy URL (usually
/policies/shipping-policy) - Contact email for customer support
Shopify doesn't have a native way to serve files from /.well-known/, but you can use a workaround with theme files and a redirect.
Option A: Using Shopify Files (Recommended)
- Go to Settings โ Files in your Shopify admin
- Click Upload files
- Upload your
ucp.jsonfile (generated in Step 1) - Copy the file URL (it will look like
https://cdn.shopify.com/s/files/...)
Now create a redirect so AI agents can find your UCP profile at the standard location.
- Go to Online Store โ Navigation
- Scroll down to URL Redirects
- Click Add URL redirect
- Set the redirect:
- Redirect from:
/.well-known/ucp - Redirect to: Your CDN file URL from Step 2
- Redirect from:
- Click Save redirect
Option B: Using Theme Liquid (Advanced)
For more control, you can serve the UCP profile directly from your theme:
- Go to Online Store โ Themes โ Edit code
- Create a new template: Templates โ Add a new template
- Select page as the type and name it
ucp - Replace the content with:
{%- layout none -%} {%- comment -%} UCP Profile - Universal Commerce Protocol Generated by UCP Tools {%- endcomment -%} { "profile_version": "1.0", "merchant": { "name": "{{ shop.name }}", "url": "{{ shop.url }}", "contact": { "email": "{{ shop.email }}" } }, "capabilities": ["browse", "search"], "policies": { "returns_url": "{{ shop.url }}/policies/refund-policy", "shipping_url": "{{ shop.url }}/policies/shipping-policy", "privacy_url": "{{ shop.url }}/policies/privacy-policy" } }
- Create a page with the handle
well-known-ucp - Add the redirect from
/.well-known/ucpto/pages/well-known-ucp
For maximum AI compatibility, add Schema.org markup to your product pages. Shopify themes often include this by default, but verify it's present.
Go to Online Store โ Themes โ Edit code and check product.liquid or main-product.liquid for JSON-LD structured data.
After setup, validate your UCP profile to ensure everything is working correctly.
Common Issues & Solutions
| Issue | Solution |
|---|---|
404 on /.well-known/ucp |
Check that your redirect is active and the target file exists |
| CORS errors | Shopify CDN should handle this; try re-uploading the file |
| Invalid JSON | Re-generate your UCP profile using the generator tool |
| Missing policies | Ensure all policy pages exist and are published in Shopify |
Shopify Apps for UCP
While you can implement UCP manually, there are apps that simplify the process:
In the meantime, manual implementation is straightforward and gives you full control over your UCP profile.
๐ค Test with AI Agents
After implementation, test how AI shopping agents will interact with your store:
Run AI Agent Simulation
Test the full AI shopping experience on your Shopify store.
Open Simulator โ