legacy.retrieve_segment
    • 3 Minutes to read
    • Dark
      Light

    legacy.retrieve_segment

    • Dark
      Light

    Article summary

    General Information

    This method cannot be combined with any other method call within the same POST command.

    While this method will continue to be supported for existing integrations, all new integrations should use the account.getStaticSegments method and the account.getCategories method.

    This method will return the full list of static segments and Categories that have been created for the account – either within the application itself or via the legacy.add_segment method call.

    A Category corresponds to a field appearing on your web sign-up page (or subscriber preference page) that collects specific information about the subscriber. Categories contain pre-defined selectable values that are displayed online as either checkboxes or in a drop-down list. Examples include Age Group, Gender, Demographic Marketing Area, Favorite Music Genre, Financial Investing Risk Tolerance, Favorite Travel Destinations, and so forth. Each selection choice of a Category is a separate static segment that groups subscribers together in terms of their similar responses. Hence, a single Category is a collection of static segments that the marketer has grouped together.

    To associate a static segment with a Category via the API, use the legacy.add_segment method and include the <category_id> element specifying the ID number of the specific Category.

    To associate a static segment with a Category in the application, log in and navigate to Segmentation > Create Static Segment to create the static segment and select the Category you wish to associate it with.

    Arguments

    Field

    Description

    Field Type

    Required

    Example

    return_group_data

    A boolean value that when set to '1', instructs the system to return a list of all static segments for the account. The default value is '0'.

    Boolean

    Conditional. Required if <return_category_data> is not included in the POSTed message.

    1

    return_category_data

    A boolean value that when set to '1', instructs the system to return a list of all categories for the account. The default value is '0'.

    Boolean

    Conditional. Required if <return_group_data> is not included in the POSTed message.

    1

    Response

    Field

    Description

    Example

    manifest

    This element encapsulates all static segment and category information. It's two direct descendants are the <group_data> element and the <category_data>

    N/A

    group_data

    This element encapsulates all static segment information. It is a collection of <group_information> elements.

    N/A

    group_information

    The information for each static segment is encapsulated within this element.

    N/A

    group_name

    The name of the static segment

    T-Shirts

    group_id

    The ID number of the static segment. To view a list of static segments and their corresponding ID numbers within the application, log in and navigate to Administration > Configure Settings > Account and Segment IDs . Scroll down on the screen to the Segments section to find the segment name and its corresponding segment ID.

    55168

    group_order

    If the static segment is associated with a Category, then this identifies the order in which this segment appears as a selection option within the Category.

    1

    group_hidden

    A boolean value that defines whether the segment should be displayed as a selection option for the Category it is associated with.

    • 0 – display this segment as a selectable option.

    • 1 – do not display this segment.

    0

    category_id

    The ID number of the category that this static segment is associated with. (see <category_information> below.)

    44

    category_data

    This element encapsulates all Category information. It is a collection of <category_information> elements.

    N/A

    category_information

    The information for each Category is encapsulated within this element.

    N/A

    category_name

    The name of the category

    Purchase Categories

    category_id

    The ID number of the category.

    44

    category_type

    The HTML form control that displays the Category on the web page (e.g. sign-up form, subscriber preference page, etc.) Currently, the only options are "checkbox" or "drop-down".

    checkbox

    category_order

    The order in which the Category will appear as a field on the sign-up form.

    2

    Example Post

    <methodCall>
    <methodName>legacy.retrieve_segment</methodName>
    <return_group_data>1</return_group_data>
    </methodCall>

    Example Response

    <methodResponse>
    <item>
    <methodName>legacy.retrieve_segment</methodName>
    <responseData>
    <manifest>
    <group_data>
    <group_information>
    <group_name>T-shirts</group_name>
    <group_id>55168</group_id>
    <group_order>1</group_order>
    <group_hidden>1</group_hidden>
    <category_id>44</category_id>
    </group_information>
    <group_information>
    <group_name>Shoes</group_name>
    <group_id>58067</group_id>
    <group_order>2</group_order>
    <group_hidden>1</group_hidden>
    <category_id>44</category_id>
    </group_information>
    <group_information>
    <group_name>zip-92127, 36 miles</group_name>
    <group_id>58068</group_id>
    <group_order>3</group_order>
    <group_hidden>1</group_hidden>
    <category_id>2284</category_id>
    </group_information>
    <group_information>
    <group_name>zip-99999, 50 miles</group_name>
    <group_id>58470</group_id>
    <group_order>4</group_order>
    <group_hidden>1</group_hidden>
    <category_id>2284</category_id>
    </group_information>
    </group_data>
    <category_data>
    <category_information>
    <category_name>Purchase Categories</category_name>
    <category_id>44</category_id>
    <category_type>checkbox</category_type>
    <category_order>1</category_order>
    </category_information>
    <category_information>
    <category_name>Regions</category_name>
    <category_id>2284</category_id>
    <category_type>checkbox</category_type>
    <category_order>3</category_order>
    </category_information>
    </category_data>
    </manifest>
    </responseData>
    <responseNum>1</responseNum>
    </item>
    </methodResponse>


    Was this article helpful?