Shopify
Integrate Agentforce with Shopify to manage products, orders, customers, and other e-commerce operations.
Purpose and Capabilities
The Shopify Connector enables Agentforce agents to interact directly with Shopify stores, providing a powerful way to automate and enhance e-commerce operations. Agents can manage products (create, update, delete, view), process orders (retrieve, update status, fulfill), access and update customer data, manage inventory, and interact with other Shopify resources. This allows for the creation of sophisticated agent-driven workflows for tasks like automated order processing, personalized customer interactions, inventory synchronization, and dynamic product catalog management.
Key Tools
The Shopify Connector offers a range of tools for comprehensive e-commerce management. Here are some key examples:
Tool Name | Description | Example Inputs |
---|---|---|
shopify_create_product | Creates a new product in the Shopify store. | title: "Awesome T-Shirt", body_html: "<strong>Comfortable and stylish!</strong>", vendor: "Agentforce Apparel" |
shopify_get_product | Retrieves details for a specific product by its ID. | product_id: "prod_12345" |
shopify_update_product | Updates an existing product’s details (e.g., price, description, inventory). | product_id: "prod_12345", price: "29.99", inventory_quantity: 100 |
shopify_delete_product | Deletes a product from the store. | product_id: "prod_67890" |
shopify_list_products | Lists products, with optional filters for collection, tags, etc. | collection_id: "col_abc", limit: 50 |
shopify_get_order | Retrieves details for a specific order. | order_id: "ord_xyz123" |
shopify_list_orders | Lists orders, with filters for status, date, customer, etc. | status: "open", financial_status: "paid", limit: 20 |
shopify_update_order_status | Updates the fulfillment or payment status of an order. | order_id: "ord_xyz123", fulfillment_status: "fulfilled", tracking_number: "TN123456789" |
shopify_create_customer | Creates a new customer record. | first_name: "Jane", last_name: "Doe", email: "jane.doe@example.com" |
shopify_get_customer | Retrieves details for a specific customer. | customer_id: "cust_qrs789" |
shopify_update_customer | Updates an existing customer’s information. | customer_id: "cust_qrs789", phone: "+15551234567" |
shopify_manage_inventory | Adjusts inventory levels for a product variant. | variant_id: "var_pqr001", inventory_adjustment: -5 |
(Note: Actual tool names and parameters may vary based on the final implementation.)
Prerequisites
To use the Shopify Connector, you will need:
- A Shopify Store: You must have an active Shopify store.
- Shopify Admin API Access: The connector interacts with your store via the Shopify Admin API.
- Custom App or Private App Credentials: You’ll need to create a Custom App (recommended) or a Private App within your Shopify admin to generate API credentials.
- Custom App: Provides more granular control over API scopes and is the modern way to integrate.
- Private App: A simpler method, but less flexible and not recommended for new integrations if Custom Apps are available on your Shopify plan.
- API Key and Admin API Access Token: Generated when you create the app in Shopify.
- Necessary Permissions (Scopes): The app must be granted the appropriate permissions (scopes) to access the resources your agents need (e.g.,
read_products
,write_products
,read_orders
,write_orders
,read_customers
,write_customers
).
Setup Guide
Follow these steps to set up the Shopify Connector:
-
Log in to Your Shopify Admin:
- Go to your Shopify store’s admin panel (e.g.,
your-store-name.myshopify.com/admin
).
- Go to your Shopify store’s admin panel (e.g.,
-
Create a Custom App (Recommended):
- Navigate to “Apps” from the side menu.
- Click on “Apps and sales channel settings”.
- Click “Develop apps for your store”.
- Click “Create an app”.
- Provide an “App name” (e.g., “Agentforce ACP Connector”) and select an “App developer”.
- Click “Create app”.
- Once the app is created, go to the “Configuration” tab.
- Under “Admin API integration”, click “Configure”.
- Select the required Admin API access scopes based on the actions your agents will perform (e.g.,
write_products
,read_orders
,write_customers
). Be sure to grant only necessary permissions. - Click “Save”.
- Navigate to the “API credentials” tab.
- Click “Install app” and confirm the installation.
- You will now see your Admin API access token, API key, and API secret key. The Admin API access token is primarily what you’ll use (often referred to as the API password or access token). Securely store these credentials.
-
(Alternative) Create a Private App (If Custom Apps are not available/preferred):
- Navigate to “Apps”.
- Scroll down and click “Manage private apps” (this link might vary slightly).
- Click “Create new private app”.
- Enter a “Private app name” (e.g., “Agentforce ACP”) and an “Emergency developer email”.
- In the “Admin API permissions” section, grant the necessary permissions (e.g., “Read and write” for Products, Orders, Customers).
- Click “Save”. You will be shown an API key and Password. Securely store these.
-
Configure the Connector in Agentforce:
- In your Agentforce ACP configuration interface, go to the Shopify Connector settings.
- Enter your Shopify store name (e.g.,
your-store-name
fromyour-store-name.myshopify.com
). - Enter the Admin API access token (for Custom Apps) or the Password (for Private Apps).
- The API key might also be required depending on the Agentforce implementation.
- Save the configuration. Agentforce will use these credentials to authenticate with your Shopify store.
Common Use Cases
- Automated Order Processing: Agents can monitor for new orders, update their status, trigger fulfillment workflows, and notify customers.
- Inventory Management: Agents can check stock levels, update inventory counts after sales or restocks, and flag low-stock items.
- Product Catalog Management: Agents can add new products, update product descriptions or pricing, and manage product collections.
- Customer Service Automation: Agents can retrieve customer order histories, update customer contact information, and create new customer records.
- Personalized Marketing: Agents can segment customers based on purchase history and trigger targeted marketing campaigns (e.g., via integration with a marketing connector).
- Reporting and Analytics: Agents can extract sales data, product performance metrics, and customer statistics for custom reports.
Troubleshooting Tips
- Authentication Errors (401 Unauthorized):
- Verify the Shopify store name is correct.
- Ensure the Admin API Access Token (or Password for private apps) and API Key are correctly entered in Agentforce.
- Check that the Custom/Private App is installed and has not been uninstalled.
- Confirm the app has the necessary API scopes/permissions for the attempted action.
- Forbidden Errors (403):
- This usually indicates the app has authenticated successfully but lacks the specific permission (scope) for the requested resource or action. Review and update the app’s permissions in Shopify admin.
- API Rate Limits:
- Shopify imposes API rate limits. If agents make too many requests in a short period, you’ll encounter errors. Implement retry logic with backoff, or optimize agent workflows to reduce API calls. Check Shopify’s documentation for current rate limit details.
- Resource Not Found (404):
- Double-check the
product_id
,order_id
, orcustomer_id
being used. - Ensure the item hasn’t been deleted from Shopify.
- Double-check the
- Incorrect Scopes:
- If an agent can read data but not write it (or vice-versa), it’s likely an issue with the granted API scopes. Modify the app’s permissions in Shopify.
For detailed information on Shopify’s API, refer to the Shopify Admin API documentation.