pavansuresh commited on
Commit
a1b95f2
·
verified ·
1 Parent(s): 7361221

Create retry_failed_migration.py

Browse files
Files changed (1) hide show
  1. retry_failed_migration.py +16 -0
retry_failed_migration.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sample function to retry failed migration
2
+ def retry_failed_migration(record_id, corrected_data, token, instance_url):
3
+ # Reattempt creating the Salesforce record
4
+ retry_response = create_record("Contract__c", corrected_data, token, instance_url)
5
+ return retry_response
6
+
7
+ # Example usage
8
+ corrected_data = {
9
+ "Name": "Contract123",
10
+ "Contract_Term__c": "12 months",
11
+ "StartDate": "2025-02-01",
12
+ "EndDate": "2025-12-31"
13
+ }
14
+
15
+ retry_response = retry_failed_migration("12345", corrected_data, "your_salesforce_access_token", "https://your-instance.salesforce.com")
16
+ retry_response