TDX to Salesforce
1. Main objective of the initial Sync will be to populate the contact data from Traction Next to Sales force.
- It populates all the fields from Traction Next to Salesforce which are mapped using mapping screen.
- Identifier defined in the mapping will used as a unique key to identify the records.
Note: Make sure the contact mapping has been done with proper care. If Identifier or field mapping are not mapped correctly then there are chances of bad data creation which user will have to cleaned up first and redo the entire setting again.
2. API Consumed:
API: POST /v1/Contacts/Export
3. TDX to Salesforce Initial Sync performs below major tasks.
- Copy and overwrite all data from TDX to Salesforce.
- If record already exists in salesforce, it will be updated with traction next details and if not then a new record will be created on Salesforce side.
- It will populate all the fields mentioned in the mapping to salesforce.
- Job does not consider Null values. If there is a null value in any of the field/column of Traction Next, job will not consider it for processing.
- Apart from column mapped in the mapping screen, it populates below mentioned details
- SF_Identifier__c for new records.
- TDX_Contact_Id__c, this column will be used as a reference in Salesforce to TDX initial Sync.
- TDX_Sync_Status__c, if successful.
- Global_Subscriber__c
- Job will not execute if there is already a job is running.
- Job can only be triggered using the Integration user defined in Admin Screen. It will not allow other user to execute the job.
- This job will also populate the global subscription flag from Traction Next to Sales force for all the records.
4. Steps to initiate the Initial Sync Job.
- Go Admin Screen.
- There is a button to initiate Sync in the section
5. Once the Initial Sync initiated below message will be appear in Admin Screen.
6. If user will try to resubmit, the button then below error will be displayed.
7. If user tries to revisit the page then page will not have the buttons to submit the job if any job is running and appropriate info message is shown to user.
8. Once the initial Sync is complete then buttons for manual Sync for TDX to Salesforce will be visible.
User will not be able to submit the manual TDX to Salesforce or retry fail job until the Salesforce to TDX Initial Sync is completed.
9. User will be able to see the summary in Admin Screen. Admin screen will display total 10 executions of Sync activities.
(Salesforce to TDX)
1. Once TDX to Salesforce job is completed, Integration user needs to run the Salesforce to TDX job by clicking ‘Start Initial Sync’ button of ‘Salesforce to TDX Contact Sync’.
API Consumed:
POST /v1/Contacts/Export
PUT /v1/Contacts/{FieldName}
2. TDX to Salesforce Initial Sync performs below major tasks.
- Copy and overwrite all data from TDX to Salesforce.
- If record already exists in salesforce, it will be updated with traction next details and if not then a new record will be created on Salesforce side.
- It will populate all the fields mentioned in the mapping to salesforce.
- Job does not consider Null values. If there is a null value in any of the field/column of Traction Next, job will not consider it for processing.
- Apart from column mapped in the mapping screen, it populates below mentioned details
- SF_Identifier__c for new records.
- TDX_Contact_Id__c, this column will be used as a reference in Salesforce to TDX initial Sync.
- TDX_Sync_Status__c, if successful.
- Global_Subscriber__c
- Job will not execute if there is already a job is running.
- Job can only be triggered using the Integration user defined in Admin Screen. It will not allow other user to execute the job.
- This job will also populate the global subscription flag from Traction Next to Salesforce for all the records.
3. Steps to initiate the Initial Sync Job.
- Go Admin Screen.
- There is a button to initiate Sync in the section
4. Once the Initial Sync initiated below message will be appear in Admin Screen.
5. If user will try to resubmit, the button then below error will be displayed.
6. If user tries to revisit the page then page will not have the buttons to submit the job if any job is running and appropriate info message is shown to user.
7. Once the initial Sync is complete then buttons for manual Sync for TDX to Salesforce will be visible.
User will not be able to submit the manual TDX to Salesforce or retry fail job until the Salesforce to TDX Initial Sync is completed.
8. User will be able to see the summary in Admin Screen. Admin screen will display total 10 executions of Sync activities.
Manual Sync
- Integration user will be eligible to run the manual sync job once initial sync is completed.
2. Integration user will have option to run manual sync in 2 ways:a.
- TDX to Salesforce
- Salesforce to TDX.
3. Manual sync will trigger only if no other sync job is running at that particular time.
- If any of the sync jobs is already running, in that case user will get a message “Sync job already running, please run this job after completion of already running job”.
4. This sync is carried out as per comparison logic; the record which is more recently updated is the winning record for update in other system. More details below.
Manual Sync (TDX to SFDC):
- User can start the job by clicking the ‘Sync’ button provided in ‘TDX To Salesforce Contact Sync’ section of Admin Screen.
2. New records from the TDX side, which do not exists in SFDC will be created in SFDC as part of this job.
3. Updates: ‘Record 1’ exists in both TDX and SFDC.
- Case 1: ‘Record 1’ is not modified in TDX after the last sync job ran on this instance.
- Record 1 is not eligible for sync from TDX to SFDC.
- Case 2: ‘Record 1’ is modified in TDX, no updates in SFDC for this record.
- ‘Record 1’ is eligible for sync from TDX to Salesforce.
- Updates for ‘Record 1’ will be pushed to SFDC and this record will be updated in SFDC.
- Case 3: ‘Record 1’ is modified in both the systems (i.e. TDX and SFDC) after last sync.
- Modified time in TDX: 10:15 AM
- Modified time in SFDC: 11:30 AM
Record 1 is not eligible for sync from TDX to SFDC since updates to contact in SFDC is more recent than TDX.
- Case 4: ‘Record 1’ is modified in both the systems (i.e. TDX and SFDC) after last sync.
- Modified time in TDX: 10:15 AM
- Modified time in SFDC: 8:30 AM
Record 1 is eligible for sync from TDX to SFDC since contact updates in TDX is more recent than SFDC. The contact updates will be pushed to SFDC and record in SFDC will be overwritten by TDX data.
4. API used for this sync:
- POST /v1/Contacts/Export.
5. On Successful Sync, user receives Email which will elaborate details about sync.
Manual Sync (SFDC to TDX):
1. New records from the SFDC side, which do not exists in TDX will be created in TDX as part of his job.
2. Updates: ‘Record 1’ exists in both TDX and SFDC.
- Case 1: ‘Record 1’ is not modified in SFDC after the last sync job ran on this instance.
- Record 1 is not eligible for sync from SFDC to TDX.
- Case 2: ‘Record 1’ is modified in SFDC, no updates in TDX for this record.
- ‘Record 1’ is eligible for sync from SFDC to TDX.
- Updates for ‘Record 1’ will be pushed to TDX from SFDC and this record will be updated in TDX.
- Case 3: ‘Record 1’ is modified in both the systems (i.e. TDX and SFDC) after last sync.
- Modified time in SFDC: 12:15 PM
- Modified time in TDX: 13:30 PM
Record 1 is not eligible for sync from SFDC to TDX since updates to contact in TDX is more recent than SFDC.
- Case 4: ‘Record 1’ is modified in both the systems (i.e. TDX and SFDC) after last sync.
- Modified time in SFDC: 13:15 PM
- Modified time in TDX: 12:30 PM
Record 1 is eligible for sync from SFDC to TDX since updates to contact in SFDC is more recent than TDX.
The contact updates will be pushed to TDX from SFDC and record in TDX will be overwritten by SFDC data.
3. API used for this sync:
- POST /v1/Contacts/Export
- PUT /v1/Contacts/{FieldName}
4. On Successful Sync, user receives Email which will elaborate details about sync.
Retry Failed Contacts
1. Retry failed option consists of two sections.
- Retry Traction Next to Salesforce Sync failed requests.
- Retry Salesforce Force to Traction next failed records.
2. Retry Traction Next to Salesforce Sync failed requests:
- In Traction Next to Salesforce sync, jobs do not have control over data. Jobs can only create requests and based on that TDX will send the data. That is the reason we are only capturing failed request.
- Job will simply pick the request from the failed log which has limit, offset and lastmodifieddate and will try to pull data from Traction Next.
- If someone updates the records which were there in failed request data set then that record will be processed by manual or schedule sync and will not be processed through retry failed because it will not fall into the criteria of failed request.
- Retry failed can be triggered using the retry button of ‘TDX To Salesforce Contact Sync’ section.
- This job will pick the entire failed request which is there in TDX_Sync_Error_Log__c.
- Below is an example of the failed request logged into TDX_Sync_Error_Log__c.
{
"FieldsToReturn" : [ "BirthDate", "Test43", "phone", "Email", "FirstName", "LastName" ],
"LastCreatedFilter" : "2017-02-22T10:22:43",
"LastModifiedFilter" : "2017-02-22T10:22:43"
}
- Once the records are processed successfully, request in failed log will be marked as retry successful and will not be picked further.
- There may be chances that records received through response of initial,manual and schedule sync up got failed while upserting (updating/Inserting) the salesforce data base due to data issues. These records will be stored in TDX_Failed_Contacts_Log__c Such records will be reprocessed through the manual or scheduled sync up automatically once user updates the records on Traction Next. And records will be deleted automatically if successful in next run.
- Job will send the details of the retry failed.
3. Retry Salesforce Force to Traction next failed records:
- Salesforce to Traction Next job has full control over data and job is capturing details of each and every failed records.
- Object TDX_Failed_Contacts_Log__c is being used to capture the failed records of Salesforce to Traction Next Initial, schedule and Manual jobs.
- User can trigger the job using the ‘Retry Fail’ button mentioned in ‘TDX To Salesforce Contact Sync’.
- Once the record is processed successfully then it will be deleted from the log object.
- Integration user will receive an email with count details.
4. This option helps user to Re sync all the contact records which are failed
- From Initial or manual sync.
5. Records which are failed due to Network time due to invalid status or wrong API Response are picked up automatically in this operation.
6. User need to correct records which are failed due to duplicate value, or because missing of any required field before running Retry failed option. Otherwise these records won’t take part in retry sync process.
Scheduling the Sync Jobs
- TDX to salesforce and Salesforce to TDX sync can be scheduled using the scheduling option available in salesforce.
- Go to below path:
- Setup ---> Apex Classes ---> Click on Schedule Apex.
- Provide the job Name.
- Click on apex classes lookup and select
- Select ScheduleSalesforcetoTDXSync to schedule Salesforce to TDX and if you want to schedule TDX to salesforce then select ScheduleTDXtoSalesforceSync.
- Select the schedule details like days, start date and end date.
- Select the time of execution.
- Click on save.
- Admin can go and check the scheduled job. Go to Setup ---> Scheduled jobs
Comments
0 comments
Please sign in to leave a comment.