Get A Segment Users - UNEXO icon

Get A Segment Users - UNEXO

Node to get the users of a segment

Overview

This node, "Get A Segment Users - UNEXO," retrieves users belonging to a specific segment from an external Customer Data Platform (CDP) service. It allows users to either select a predefined segment or define a custom segmentation rule in JSON format. This is useful for workflows that require targeted user data based on dynamic or pre-existing segmentation criteria, such as personalized marketing campaigns, user behavior analysis, or audience-specific notifications.

Practical examples:

  • Fetching all users who belong to a "High Value Customers" segment to send them exclusive offers.
  • Defining a custom filter rule to get users who have performed a certain action within the last 30 days.
  • Integrating with downstream nodes to analyze or export segmented user data.

Properties

Name Meaning
Select A Segment Choose a segment from a dynamically loaded list of segments or opt to use a custom segment filtering rule. The options are fetched from the external CDP service. Default option is to use a manual filtering rule.
Segment Filtering Rule Enter a JSON object defining custom conditions for segmenting users. Can be manually written or assisted by an AI tool. Used only if the default segment selection is overridden.

Output

The node outputs an array of user objects in JSON format under the json output field. Each object represents a user matching the selected segment or filtering rule. The exact structure of each user object depends on the external CDP's API response but typically includes user attributes relevant to the segment.

No binary data output is produced by this node.

Dependencies

  • Requires access to an external Customer Data Platform (CDP) API endpoint configured via environment variables:
    • CDP_URL: Base URL of the CDP API.
    • UNEXO_API_KEY: An API key token used for authorization in HTTP headers.
  • The node uses HTTP requests to fetch segment names and retrieve users.
  • Proper configuration of these environment variables and network access to the CDP API is necessary for successful execution.

Troubleshooting

  • Common issues:

    • Missing or incorrect environment variables (CDP_URL, UNEXO_API_KEY) will cause authentication or connection failures.
    • Selecting a segment that no longer exists or has been deleted may result in empty responses or errors.
    • Malformed JSON in the "Segment Filtering Rule" property can cause request failures.
  • Error messages and resolutions:

    • 401 Unauthorized or 403 Forbidden: Check that the API key is valid and has sufficient permissions.
    • Network errors or timeouts: Verify network connectivity to the CDP API endpoint.
    • Invalid JSON error: Ensure the JSON entered in the filtering rule is syntactically correct.
    • Empty results: Confirm that the selected segment or filtering rule actually matches users in the CDP.

Links and References

  • No direct links provided in the source code. For more information, consult the documentation of the external Customer Data Platform API referenced by the environment variables.

Discussion