Shopify List Products Documentation
Overview
This node interface with the Shopify API, allowing users to fetch a list of products from their Shopify store. It serves as a bridge between the data platform "Vantage" and Shopify, offering options to filter products by various attributes like status, vendor, and product type. This facilitates the integration of Shopify product data into broader analytical workflows and applications using Vantage.
Settings
This node comprises several configurable settings. Below is a detailed explanation of each setting available:
1. limit
- Input Type: Numeric
- Description: This setting defines the maximum number of products to retrieve from Shopify at a time. A higher limit retrieves more products, while a lower limit reduces the size of the response. It is crucial for controlling performance and ensuring that the data returned is manageable within the context of the application.
- Default Value: 50
2. status
- Input Type: String (with predefined possible values)
- Description: This setting specifies the status of the products to be fetched. The possible values generally include 'active', 'draft', and 'archived'. Adjusting this setting allows users to filter products based on their current state. For instance, setting it to 'draft' retrieves products that are not yet published.
- Default Value: 'active'
3. vendor
- Input Type: String
- Description: This setting allows users to filter products by the vendor's name associated with the products in Shopify. Entering a specific vendor name retrieves only those products attributable to that vendor. Leaving this value blank results in no vendor-based filtering.
- Default Value: null
4. product_type
- Input Type: String
- Description: This setting filters the products based on their type as defined in Shopify. Users can input a specific product type to limit the results. If this value is not specified, all product types will be included in the results.
- Default Value: null
How It Works
This node performs several steps to fetch and prepare the product data:
-
Build Connection Instance: It first establishes a connection with the Shopify API using the the integration connection function. This requires a context input, which contains necessary authentication and environmental details.
-
Parameters Preparation: It constructs a
paramsobject that includes input settings from the user and several default values. Null or undefined values from the user inputs will be removed from this object. -
API Call: The component then makes an asynchronous call to Shopify's
getProductsmethod, passing in the preparedparams. -
Output Formatting: The returned data is formatted into a structured output, including:
- A list of products based on the retrieved data.
- The total count of the products fetched.
- Meta information summarizing the request details (like count and applied filters).
-
Error Handling: If any errors occur during this process, they are caught, logged to the console, and a user-friendly error message is returned.
Data Expectations
The shopifyListProducts component expects the following data:
-
Inputs Object:
limit(optional): Determines how many products to retrieve.status(optional): Filters products by their current status.vendor(optional): Filters products by vendor.product_type(optional): Filters products by their type.
-
Context Object: The context should provide necessary authentication and configuration settings assigned to the Shopify integration.
Use Cases & Examples
Use Cases
-
E-Commerce Analytics Dashboard: An e-commerce business can utilize the
shopifyListProductscomponent to pull sales data for visualizing product performance metrics, trends, and inventory assessments over time. -
Product Catalog Management: A company managing multiple Shopify stores might leverage this component to curate product lists dynamically, displaying them on various platforms or aggregating them for reporting.
-
Integration with Marketing Tools: Marketers wanting to enhance their campaigns with specific product details can use this component to fetch targeted product information based on their advertising needs.
Example Configuration
Use Case: A retail business wants to analyze only the active products from a specific vendor, "Acme Co.", to optimize their marketing strategy.
Sample Configuration Data:
{
"inputs": {
"limit": 100,
"status": "active",
"vendor": "Acme Co.",
"product_type": null
},
"config": {
"limit": null,
"status": null,
"vendor": null,
"product_type": null
},
"context": {
"api_key": "YOUR_SHOPIFY_API_KEY",
"store_name": "yourstore.myshopify.com"
}
}In this example, the configuration requests a maximum of 100 active products from the vendor "Acme Co." The product_type is left unset, allowing it to include all types of products within the specified parameters. The context object must include valid Shopify API credentials to establish a successful connection.