Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Provide segment IDs to your tools. The tools can use the segments to, for example, provide personalized messaging, or monitor and report activities.


Table of Contents

Returning Segment IDs to Your Tool

There are few reasons that the API call cannot return segment IDs.

Limit on the number of Segment IDs that can be returned

There is a 1KB limit to the number of segments ID that the API can return. Segment IDs are returned by Profile API as an array. When you select segments as you configure a Profiles API, limit the number of segments.

Key Column Mismatch

The segments included in the Profiles API setup must include profiles that have values that match the Profile API specified key column. If no profiles match the API key column, then API call does not return any segment IDs.

You can review profiles in a segment to ensure at least a few profiles have values that match the Profiles API key column.

Review the Profiles API Set Up

In the following profile setup, the key column is gender. In order for a segment ID to be returned by the API call, there must be records in the segment that have gender specified as an attribute, and have a value (such as male or female).

Image Modified

The following example shows what the API call would look like:

...

In the example, the API call is configured to find profiles in the specified segment where the gender is 'female' and is configured retrieve the IDs of segments in which the profile is contained.

The configuration specifying female as the gender is in the Segment. The configuration that calls the Profiles API key to retrieve the segment ID is in the Javascript located in your web app or client.


Verify the Profiles API key column against the Segment attributes and Profile values

To check if any profiles exist within a segment that has the specified key column, you can look in your Segment. You can view any profiles that return a value for the specified attribute.

In the following example, the gender value in the segment is set equal to 'Female'. The segment returns 16 profiles, which confirms that the API call can return some values to this segment and provide this segment ID, if called to do so.

Image Modified