Follow

Delete Contact

The Delete command allows you to remove one or more Contacts from your realm. The Delete command requires the following arguments: Command and Data.

cmd=delete&data=email^john.smith@domain.com

The command is ‘delete' and the contact record for the email 'john.smith@domain.com'  will be deleted in the realm. 

The Delete command is not list specific because it involves the entire Contact record and related information.  It also generates a Global Optout record, preventing the email address from being later subscribed to any list.  Any subsequent attempt to resubscribe will result in failure.

Example

Using all commands and arguments (please note the command is wrapped for display purposes only):

cmd=delete&realm=myrealm_child&data=email,first ^jane@domain.com,Jane ^jane@domain.com,JD ^john@domain.com,John

Three contacts will be deleted from the realm 'myrealm_child', a child of the realm defined in the header, and an Optout record will be created for each.

Please note that the Delete action cannot be undone.  Be sure to double check the Contact before deleting data.

Customer Key Example

Some systems have the ability to define a unique Customer Key per contact.  If your realm has Customer Key enabled, then you must include the customer_key in the data argument along with email.  For example:

cmd=delete&realm=myrealm_child&data=customer_key,email^11293,jane@domain.com

If the Customer Key is not included, the command will fail.

Errors

A Delete command will fail if a contact record for the email address does not exist.  Delete will also fail if more than one contact is found with the same email address.  Since Contact records are allowed to have the same Email address as long as the First Name is unique, you may wish to include the first name in your Delete command to avoid encountering errors or removing the wrong Contact.

Notes

If using the Relational Tables feature, when a contact is deleted foreign key data dependent on that contact will also be removed. This is true for both a regular table and a join table; however, not stored data in a flat table.

Arguments

The Delete command supports the following arguments:

Name

Req?

Description

Argument

Command

Yes

Defines the command to use.

cmd=delete

Realm

 

Name of the realm to run the command.  This is optional, and only necessary when submitting files to a parent realm to manipulate data for a child realm.

realm=[realm_name]

Data Yes Contact related data.  Email is always required, and additional fields are optional.  Be sure to include First Name if duplicate contacts exist with the same email address.

data=[fields]

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk