Our data model for Contract is like below:

  1. Contract
  2. Contract Line Item (Each Contract Line Item corresponds to an Opportunity Line Item)
  3. Each Account(Customer) is associated with a Contract

Below are the things that I am trying to solve for:

a. Each time a new Contract Line Item is created or Modified, I need to send JSON Payload to an external system. b. Each time any modification to a set of fields (Rating, Active__c ) are done or any modifications to contacts associated with the Account are done, I need to send JSON payload to the same external system mentioned in 1

Each day atleast 3000 Accounts are modified, which means corresponding contacts and contract line Items also get modified

Approaches that I considered

  1. Trigger Approach which definitely will not work as it has to deal with changes on multiple objects
  2. Schedule a batch to run every 15 mins

Apart from the above two approaches, can I consider any other realtime approach that sends does a callout as soon the modifications are detected?

  • Have you considered writing change event triggers? You'll still need multiple triggers, but they can all call a common utility class. – sfdcfox Jun 19 '19 at 14:07
  • Also what is wrong with regular triggers? as well as they call utility class as well? – kurunve Jun 19 '19 at 14:10
  • The problem with Triggers is Accounts,Contacts,Contracts are all related objects. There can be a possibility that all of these change everyday multiple times and the JSON payload which includes Account, Contact and Contracts information needs to be sent anytime a change is done on any of these objects. This will lead to multiple payloads for the same customer. Even with the batch approach multiple payloads will be sent. So I am confused – Shiva Achukatla Jun 19 '19 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.