Purge data - PurgeData

Deletes all records from an Acoustic Campaign database, suppression, seed, test, or contact list (target) based on the contacts that exist in a specific database, contact list, or query (source).

📘

Keep in mind

If more than one database shares the same key definition, contacts are matched using the key. However, if the key definition is different, contacts are matched using email address.

To purge contacts from a flexible database, use an associate query or contact list as the source. Specifying different flexible databases for target and source does not result in any matches

If a contact list is specified for the target, records are not deleted from the database; the contacts are only removed from the contact list.

Elements (Required)

TARGET_ID - The ID of the purged database, suppression, seed, test, contact list, or relational table.

SOURCE_ID - The ID of the database, suppression, seed, test, contact list, relational table, or query used to determine what records are deleted.
Note: If a Query ID is specified, it must be a classic query. New queries are not supported.

📘

Determine the status of your data job

Use the GetJobStatus call to see your purge job status.

<Envelope>
  <Body>
    <PurgeData>
      <TARGET_ID>87981</TARGET_ID>
      <SOURCE_ID>64987</SOURCE_ID>
    </PurgeData>
  </Body>
</Envelope>
<Envelope>
  <Body>
    <RESULT>
      <SUCCESS>TRUE</SUCCESS>
      <JOB_ID>98784</JOB_ID>
    </RESULT>
  </Body>
</Envelope>

Elements (Results)

SUCCESS - True if successful, False if not.

JOB_ID - Identifies the Acoustic Campaign background job created for the purge.

👍

A successful data job

  • Remove contacts that are found in the target object that also exist in the source object.
    • Create a new database or list that contains copies of the purged records.

Purge large quantities of data from relational tables

Use the PurgeData XML API to purge large quantities of individual records from relational tables. To purge the data, provide two relational tables as the source and target lists. The two relational tables must have identical unique ids. The target table records that match the records in the source table will be deleted.

For example,
A relational table has user_id as the unique identifier and the following records:

user_idvalue1value2
1v1v2
2v1v2
3v1v2
4v1v2

Import a new relational table that has user_id as the unique identifier. For example,

user_id
2
3

Then provide the first table as the target and the second as the source in the PurgeData XML API. The user_ids 2 and 3 records from the first relational table are deleted. The resulting target relational table will only have the following records:

user_idvalue1value2
1v1v2
4v1v2

📘

Note:

A copy of relational table data is not created. Therefore, make sure that only the records you want to delete are included in the source table.

Common errors messages

Can not purge a list using a relational table. – returned when attempting to purge a list using a relational table
Can not purge a relational table using a list or query. – returned when attempting to purge a relational table using a list or a query.
Both relational tables should have matching keys. – returned when one or more of the names of the unique identifiers of one table do not match the names in the second table.
Column Type <column type> for Column Name <column name> in Relational Table <table name> does not match the type <column type> for Column Name <column name> in Relational Table <table name>. – returned when a column type of one of the unique identifiers in one table does not match the column type of the corresponding unique identifier of the second table.
• The list does not exist.