legacy.group_clear

‹ BACK TO API PAGE


Description

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

This method removes all contacts from a static segment. The contacts themselves remain within the subscriber database. This is a handy method to use when marketers want to "reset" the membership of a particular static segment in anticipation of a specific campaign. Removing the static segment is also good for just routine housekeeping.

If you just want to remove a static segment itself, then use the account.removeStaticSegment method.

Arguments

Field Description Field Type Required Example
group_id A single or comma-delimited list of static segment ID numbers. To view a list of static segments and their corresponding ID numbers, log in to the application and navigate to Administration > Configure Settings > Account and Segment IDs. Scroll down on the screen to the Segments section to find the static segment name and its corresponding segment ID.

There is a limit of 100 segment IDs that you can include within the comma-delimited list.

Number Yes 47725,47792
delete A boolean value where:
  • N – (the default value) keep the static segment after all the contacts have been removed from it.
  • Y – delete the static segment after all the contacts have been removed from it
Boolean No Y
notify_email The email address that a completion notification email should be sent to. String No john_smith@example.com

Response

Field Description Example
message Indicates whether the deletion job was successfully inserted into the Mapp job engine. NOTE: The response is not an indication that the subscribers have been deleted from the static segment.
  • 1 – the deletion job was successfully inserted into the Mapp job engine.
  • 2 – the deletion job was not inserted into the Mapp job engine due to some error.
1
job_id The JOB_ID associated with the deletion request. To view a list of JOB_IDs, log in to the application and navigate to Administration > View Tasks. 862726
reason This element is included if the <message> element is set to '2'. It will explain the reason for the deletion failure. "Not all values passed through"

Response Codes

Message Code Reason Description
2 Not all values passed through The POSTed XML message is missing the required element
2 Max number of groups was exceeded There were more than 100 static segment IDs included in the comma-delimited list.

Example Post

<methodCall>

<methodName>legacy.group_clear</methodName>

<group_id>38176</group_id>

<notify_email>john_smith@example.com</notify_email>

<delete>Y</delete>

</methodCall>

Example Response

<methodResponse>

<item>

<methodName>

legacy.group_clear

</methodName>

<responseData>

<message>1</message>

<reason></reason>

<job_id>

862726

</job_id>

</responseData>

<responseNum>1</responseNum>

</item>

</methodResponse>

Example Error

<methodResponse>

<item>

<methodName>

legacy.group_clear

</methodName>

<responseData>

<message>2</message>

<reason>not all values passed through</reason>

<job_id></job_id>

</responseData>

<responseNum>1</responseNum>

</item>

</methodResponse>


Back to API Reference Guide