Note: You can’t disable or deactivate the managed package triggers.These triggers are included in the Celigo package.
Be sure to enable the debug logs to understand the triggers functionality. In your Salesforce account navigate to Setup > in Quick Find type ‘Debug Log’ > Create a new debug log with the current user logged in user.
Triggers functionality is available for all sObjects and every sObject has a managed package trigger. Let’s take an example of Contact sObject here:
- Create a “Contact” object in Salesforce
- CeligoContactUpdate trigger will be invoked as a real time event.
Note: All Celigo triggers are executed After submit only.
- Once the trigger enters the ‘After Submit’ event, it will invoke the Integrator Distributed Adaptor package.
- A call to RealTimeSync Sobject is made to check whether flow is enabled. (This is the first SOQL query)
- SOQL Query: SELECT Id, GUID__C, Connector_Id__c, export_when_field_is_set__c, package_version__c, Qualifier__c, Connection__r.User_Name__c, Connection__r.Password__c, Connection__r.Consumer_Key__c, Connection__r.Consumer_Secret__c, Connection__r.Token_Id__c, Connection__r.Token_Secret__c, Connection__r.Role_Id__c, Connection__r.Account_Id__c, Connection__r.Endpoint__c, Connection__r.Access_Token__c, NetSuite_Sync_Error_Field__c, NetSuite_Internal_Id_Field__c, Real_Time_Data_Flow_Id__c, SObject_Type__c, Referenced_Fields__c, User_Defined_Referenced_Fields__c, Batch_Size__c, Skip_Export_Field_Id__c FROM Real_Time_Sync__c WHERE (Disabled__c = FALSE AND SObject_Type__c = :tmpVar1 AND Origin__c = :tmpVar2 AND Connector_Id__c = :tmpVar3)
- You’ll see the results greater than 0 if the flow is enabled. Or else, the result is 0 and the trigger is terminated.
Note: Only one SOQL is executed when flow is disabled.
- If the flow is enabled, another SOQL is executed to fetch the related list on flow.(This is the second SOQL query)
- SOQL: SELECT Real_Time_Sync__c, Related_Parent_Field__c, Related_SObject_Type__c, Referenced_Fields__c, Filter__c, Order_by__c FROM Related_SObject_Sync__c WHERE Real_Time_Sync__c IN :tmpVar1
- If you set any Qualification criteria in flow settings, then another SOQL query to check if the record is satisfied to sync to Integration App is executed.(This is the third SOQL query)
- SOQL: Select Id from Contact where (IO Configured filter will be added here) and Id IN : Ids
- If it is not satisfied, the trigger is terminated
- You can check the “Skip Export To NetSuite” checkbox in Salesforce on any record to skip that record to sync to Integration App.
If the “Skip Export to NetSuite" checkbox is checked, the flow isn’t invoked and a SOQL query is executed.(This is the fourth SOQL query and is optional)
- SOQL: select id,celigo_sfnsio__skip_export_to_netsuite__c from account where id in :ids FOR UPDATE.
- The record is locked while unchecking the SkipExport Field to prevent race conditions and thread safety problems.
- The “Skip Export To NetSuite” checkbox is unchecked and the trigger is terminated.
- The field afterSubmit is updated, the trigger will be executed again but all the SOQL queries are not run again and they exit from Celigo Packages.