4 min read

searchCustomersNode Documentation

Purpose

The searchCustomersNode is designed to facilitate the integration with the Stripe API specifically for the purpose of searching and retrieving customer data. It allows users to perform searches based on a query string, setting limits on the number of results returned and handling pagination through a cursor mechanism. This component is built to enhance the capabilities of the Vantage analytics and data platform by integrating with external data sources efficiently.

Settings

The searchCustomersNode has several configurable settings that adjust its functionality. Below are the detailed explanations for each setting:

1. Query

2. Limit

3. Page

How It Works

  1. Integration: The searchCustomersNode first establishes a connection to the Stripe API using a secure connection method. It pulls integration configurations such as authentication details from the context, which is passed as an argument.

  2. Input Handling: It processes the inputs by checking for query, limit, and page. It prioritizes inputs provided directly by the user over those supplied in the configuration.

  3. Error Handling: If the query is not specified, the function raises an error immediately to inform the user of the requirement for a search term.

  4. Data Retrieval: The function then calls the searchCustomersNode method on the Stripe integration, passing the validated query, limit, and page parameters. It awaits the output from this API call.

  5. Output: The function returns the customer data received from Stripe under the output1 key. If there is an error during the process, it captures and returns an error message with details about the issue encountered.

Expected Data

The searchCustomersNode expects the following data:

Use Cases & Examples

Use Case 1: Customer Data Analysis

A business wants to analyze its customer base by performing searches based on various criteria, such as email addresses or names, through its Stripe account.

Use Case 2: Customer Management System

A CRM tool integrated with Vantage requires real-time access to customer data stored in Stripe. searchCustomersNode can enable this tool to fetch and display customer information dynamically based on user inputs.

Specific Example Configuration:

Use Case 1 Implementation

To search for customers whose email contains "support":

json
{
  "inputs": {
    "query": "support",
    "limit": 50,
    "page": null
  },
  "config": {
    "query": "support",
    "limit": 50,
    "page": null
  }
}

In this configuration:

This configuration will allow the business to efficiently retrieve and analyze customer data, enhancing their operational capabilities.