avniproject / integration-service

Service for integration Avni with other systems
GNU Affero General Public License v3.0
0 stars 2 forks source link

Prevent voided Goonj encounters from being upserted into Goonj SF #48

Closed himeshr closed 2 years ago

himeshr commented 2 years ago

The purpose of this task is to, prevent voided Goonj encounters from being upserted into Goonj SF. We need to filter out encounters (DispatchReceipt, Activity and Distribution) that were deleted in Salesforce and had the Avni "/delete" external API invoked for them. We should not sync them back to Goonj, due to change in their "isVoided" and "lastModifiedDateTime" fields.

Test this change only in Goonj Sandbox (GoonjUAT on prod).

Steps to reproduce issue:

  1. Login into Goonj salesforce sandbox
  2. Selecte any demand which has anyone of the following: DispatchReceipt, Activity and Distribution
  3. Delete the entity in Salesforce (This would internally invoke the Avni "/delete" external API for them)
  4. Check that the encounter got deleted(isVoided=true) in Avni.
  5. Ensure that it is not synced back to Goonj, due to change in their "isVoided" and "lastModifiedDateTime" fields.