4 min read

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

2. status

3. vendor

4. product_type

How It Works

This node performs several steps to fetch and prepare the product data:

  1. 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.

  2. Parameters Preparation: It constructs a params object 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.

  3. API Call: The component then makes an asynchronous call to Shopify's getProducts method, passing in the prepared params.

  4. 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).
  5. 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:

Use Cases & Examples

Use Cases

  1. E-Commerce Analytics Dashboard: An e-commerce business can utilize the shopifyListProducts component to pull sales data for visualizing product performance metrics, trends, and inventory assessments over time.

  2. 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.

  3. 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:

json
{
  "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.