- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bulk delete customer profiles from CIM
Is there a method for bulk deleting customer profiles? As far as I can tell, we can only delete them one at a time. We have almost 20,000 profiles and are hoping to cull these down by removing profiles with expired payment profiles or no recent history of payment.
โ11-19-2024 11:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @zgoldberg ,
Thank you for reaching out with your question regarding bulk deletion of customer profiles in CIM. Currently, there isn't an API method for bulk deleting customer profiles directly. Profiles can only be deleted one at a time using our existing API.
However, I would recommend signing up for Account Updater (AU), which can help manage expired profiles by updating or deleting them automatically.
For bulk deletion, a possible workaround involves developing a utility to handle this process using the existing API endpoint: Delete Customer Profile API. Although direct bulk deletion isn't supported, you can create a script to iterate through customer profiles and delete them one by one.
Here is a basic example of how you might achieve this using a script in Python:
```python
import requests
api_login_id = 'your_api_login_id'
transaction_key = 'your_transaction_key'
customer_profile_ids = ['profile_id_1', 'profile_id_2', ...] # List of profile IDs to delete
def delete_customer_profile(profile_id):
url = 'https://apitest.authorize.net/xml/v1/request.api'
headers = {'Content-Type': 'application/xml'}
body = f"""
<deleteCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>{api_login_id}</name>
<transactionKey>{transaction_key}</transactionKey>
</merchantAuthentication>
<customerProfileId>{profile_id}</customerProfileId>
</deleteCustomerProfileRequest>
"""
response = requests.post(url, headers=headers, data=body)
return response.status_code, response.text
for profile_id in customer_profile_ids:
status_code, response_text = delete_customer_profile(profile_id)
print(f"Deleted profile {profile_id}: Status Code: {status_code}, Response: {response_text}")
```
Please note that this example is for demonstration purposes. You'll need to handle errors, retries, and possibly rate limits depending on your specific requirements.
If you have any further questions or need more assistance, feel free to reach out.
Best regards,
Authorize.NET Developer Team
โ11-20-2024 01:28 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I totally understand how managing 20,000 customer profiles can be a huge task! Unfortunately, as you've noticed, most systems tend to delete profiles one at a time by default. However, some platforms do offer bulk delete features, though they might not be immediately obvious.
Hereโs what Iโd recommend:
- Check for bulk actions in your system: Some platforms allow you to filter profiles (by expiration, payment history, etc.) and perform batch actions like deleting. If this option exists, it might be under advanced search or bulk edit features.
- APIs or automation: If your platform has an API, you might be able to automate this process by querying for profiles with expired payment info or no recent activity, and then deleting them in bulk using a script.
- Contact support: If youโre not sure, it might be worth reaching out to the platformโs support team. They might have a tool or solution for bulk deletion thatโs not immediately obvious in the UI.
Hope this helps, and let me know if you need more info!
โ11-23-2024 05:25 PM

