Import PinPoint Segment

Action ID: import_pinpoint_segment

Description

Import PinPoint segment.

Input Parameters

Name
Type
Required
Default
Description

application_id

string

-

The ID of the Amazon Pinpoint application to import the segment to

segment_name

string

-

The name for the imported segment

format

dropdown

-

The format of the endpoint data to import. Available options: CSV, JSON

data

string

-

The endpoint data to import in the specified format

View JSON Schema
{
  "description": "Import PinPoint segment node input.",
  "properties": {
    "application_id": {
      "description": "The ID of the application to import the segment to.",
      "title": "Application ID",
      "type": "string"
    },
    "segment_name": {
      "description": "Segment name.",
      "title": "Segment Name",
      "type": "string"
    },
    "format": {
      "description": "The format of the files that contain the endpoint definitions to import.",
      "enum": [
        "CSV",
        "JSON"
      ],
      "title": "Format",
      "type": "string"
    },
    "data": {
      "description": "The data to import.",
      "title": "Data",
      "type": "string"
    }
  },
  "required": [
    "application_id",
    "segment_name",
    "format",
    "data"
  ],
  "title": "ImportPinPointSegmentNodeInput",
  "type": "object"
}

Output Parameters

Name
Type
Description

segment_id

string

The unique identifier of the newly created segment in Amazon Pinpoint

View JSON Schema
{
  "description": "Import pinpoint node output.",
  "properties": {
    "segment_id": {
      "description": "The id of the segment.",
      "title": "Segment id",
      "type": "string"
    }
  },
  "required": [
    "segment_id"
  ],
  "title": "ImportPinpointSegmentNodeOutput",
  "type": "object"
}

How It Works

This node imports customer endpoint data into Amazon Pinpoint as a new segment, allowing you to create targeted audience groups for your marketing campaigns. It accepts endpoint data in either CSV or JSON format, processes the data according to Pinpoint's requirements, creates a new segment with the specified name, and returns the segment ID for use in subsequent campaign or targeting operations.

Usage Examples

Example 1: Import Customer Segment from CSV

Input:

application_id: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
segment_name: "Q4_2024_High_Value_Customers"
format: "CSV"
data: |
  ChannelType,Address,User.UserId,User.UserAttributes.FirstName,User.UserAttributes.LastName
  EMAIL,[email protected],user_001,John,Doe
  SMS,+12125551234,user_002,Jane,Smith
  EMAIL,[email protected],user_003,Alice,Johnson

Output:

segment_id: "seg-1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p"

Example 2: Import Mobile Users from JSON

Input:

application_id: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
segment_name: "Mobile_App_Beta_Testers"
format: "JSON"
data: |
  [
    {
      "ChannelType": "APNS",
      "Address": "device_token_abc123",
      "User": {
        "UserId": "user_101",
        "UserAttributes": {
          "AppVersion": ["2.0.0-beta"],
          "BetaTester": ["true"]
        }
      }
    },
    {
      "ChannelType": "GCM",
      "Address": "device_token_xyz789",
      "User": {
        "UserId": "user_102",
        "UserAttributes": {
          "AppVersion": ["2.0.0-beta"],
          "BetaTester": ["true"]
        }
      }
    }
  ]

Output:

segment_id: "seg-7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w"

Example 3: Import Email Campaign Audience

Input:

application_id: "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6"
segment_name: "Newsletter_Subscribers_2024"
format: "CSV"
data: |
  ChannelType,Address,User.UserId,User.UserAttributes.SubscriptionDate,User.UserAttributes.Interests
  EMAIL,[email protected],user_201,2024-01-15,Technology
  EMAIL,[email protected],user_202,2024-02-20,Marketing
  EMAIL,[email protected],user_203,2024-03-10,Business

Output:

segment_id: "seg-3x4y5z6a7b8c9d0e1f2g3h4i5j6k7l8m"

Common Use Cases

  • Customer List Imports: Import customer contact lists from CRM systems or databases into Pinpoint for targeted campaigns

  • Audience Segmentation: Create specific audience segments based on customer attributes, behaviors, or demographics

  • Campaign Targeting: Build segments for email, SMS, or push notification campaigns with filtered customer data

  • Mobile App User Groups: Import device tokens and user data for targeted mobile push notifications

  • A/B Testing Groups: Create controlled segments for marketing experiments and campaign testing

  • Re-engagement Campaigns: Import lists of inactive users or lapsed customers for win-back campaigns

  • VIP Customer Management: Create segments of high-value customers for exclusive offers and communications

Error Handling

Error Type
Cause
Solution

Invalid Application ID

The application_id doesn't exist or is inaccessible

Verify the Pinpoint application ID exists and you have proper permissions

Malformed Data

Data format doesn't match CSV or JSON structure

Ensure data is properly formatted according to Pinpoint endpoint specifications

Missing Required Fields

Endpoint data missing required ChannelType or Address

Include all required fields: ChannelType, Address, and optionally User data

Duplicate Segment Name

A segment with this name already exists

Use a unique segment name or delete the existing segment first

Invalid Channel Type

ChannelType value is not supported

Use valid channel types: EMAIL, SMS, APNS, GCM, ADM, or BAIDU

Import Size Exceeded

Data contains too many endpoints for a single import

Split the data into smaller batches and import multiple segments

Permission Denied

Insufficient IAM permissions for Pinpoint operations

Ensure your AWS credentials have pinpoint:CreateImportJob permissions

Notes

  • Data Format: Ensure your data follows Amazon Pinpoint's endpoint definition format with proper headers for CSV or correct JSON structure.

  • Channel Types: Valid channel types include EMAIL, SMS, APNS (iOS push), GCM (Android push), ADM (Amazon Device Messaging), and BAIDU.

  • User Attributes: You can include custom user attributes in the format User.UserAttributes.AttributeName for enhanced segmentation.

  • Import Limits: Amazon Pinpoint has limits on segment size and import frequency; consult AWS documentation for current limits.

  • Segment Availability: After import, it may take a few moments for the segment to be fully available for use in campaigns.

  • Data Validation: Pinpoint validates endpoint data during import; invalid records may be skipped with warnings.

  • CSV Headers: For CSV format, ensure headers match Pinpoint's naming conventions exactly, including dot notation for nested attributes.

  • Idempotency: The segment_id can be used to reference this segment in campaign nodes and targeting operations.

Last updated

Was this helpful?