Forum Discussion

darshthakkar's avatar
darshthakkar
Valued Contributor
4 years ago
Solved

Eliminating duplicated records based on the Last Updated Date

Continuing the discussion from Fetch data whose date is less than 10hrs from the existing date!: Hi Team, The discussion was going on a different thread but it would have made more sense to open ...
  • koryknick's avatar
    4 years ago

    @darshthakkar - Just FYI - the Salesforce Upsert snap returns a “created” field in the response which you can use to determine if the record was inserted vs. updated.

    In regards to pulling modified records since the last execution, I mentioned the use of a control table that you can store the last modification date pulled from the source that was successfully upserted to Salesforce. This can be done with a simple Aggregate snap to get the max date, then write back to the config table only after all updates have been completed in Salesforce.

    Note that if you are using the Bulk API option on the Salesforce Upsert snap, you may need to follow-up with a Salesforce Poller to get the final result of the updates. See the snap documentation for more details.