I am defining my custom filter criteria on a delta export for Salesforce data. I need to pull contacts that are either new or whos account has been updated since the last run. I am using the handlebars to support this and the Delta is the only way to get the Flow last export date.
With that said, the process automatically adds an additional filter to the end of the query on run time. The query in the flow:
Select Id, AccountId, Account.NS_Netsuite_Id__c, Email, Fax, Description, HomePhone, Phone, Title, MobilePhone, FirstName, LastName, MailingStreet, MailingCity, MailingState, MailingPostalCode, MailingCountry, NS_NetSuite_Id__c, NS_Send_as_test_record__c from Contact where (Account.NS_NetSuite_Id__c!=null) and NS_Skip_Export_To_NetSuite__c=false and (NOT LastModifiedBy.Name Like'%Netsuite%') and (Account.LastModifiedDate > {{lastExportDateTime}} or LastModifiedDate>{{lastExportDateTime}})
My query, I've defined the date filters. However, when I debug the connection I see the query as:
Select Id, AccountId, Account.NS_Netsuite_Id__c, Email, Fax, Description, HomePhone, Phone, Title, MobilePhone, FirstName, LastName, MailingStreet, MailingCity, MailingState, MailingPostalCode, MailingCountry, NS_NetSuite_Id__c, NS_Send_as_test_record__c from Contact where ( Account.NS_NetSuite_Id__c!=null ) and NS_Skip_Export_To_NetSuite__c=false and ( NOT LastModifiedBy.Name Like '%Netsuite%' ) and ( Account.LastModifiedDate > 2023-04-27T10:35:25.376Z or LastModifiedDate>2023-04-27T10:35:25.376Z ) and ((LastModifiedDate > 2023-04-27T10:35:25.376Z))
This has automatically added the bolded filter. Any way to prevent this?