Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADR for syncing data to Salesforce #2866

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

ADR for syncing data to Salesforce #2866

wants to merge 3 commits into from

Conversation

macrael
Copy link
Contributor

@macrael macrael commented Oct 23, 2024

Summary

ADR for syncing data to Salesforce. Still under draft, I'm less sure now about going with push initially.

Related issues

https://jiraent.cms.gov/browse/MCR-4553

- `+` Kafka supplies tricky retry logic, should be durable
- `+` If push errors, we still will get data into the system
- `+` MACPRO already has multiple data sources going into BigMac, MC Contract data would be another
- `-` adding another system to the sync process is adding complexity, more pieces to fail
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional negatives:

  • involves coordination between multiple teams which we don't have bandwidth for
  • XL scope - not feasible for short term POC

- `+` If push errors, we still will get data into the system
- `+` Would call existing app-api API, same way we've asked ARMS to
- `-` Not instantaneous, probably can't send Salesforce link in submission email
- `-` requires writing more code in Salesforce
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why writing implementation in salesforce is a negative. Is this what salesforce team said? I don't see a technical reason to avoid writing code in salesforce for this, do you? Especially if we have skills to do so on team and its the app that will consume the data.

In order for CMS users to be able to review submissions in Salesforce, all submission need to be in the Salesforce database. We will first get data into Salesforce by calling Salesforce APIS from app-api on every submission. Other data sync strategies may follow.

### Decision Drivers

Copy link
Contributor

@haworku haworku Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest adding can be implemented by end of calendar year to the list. We have serious constraints around time. I think we want to have at least a basic implementation working fairly soon.


### Chosen: Push data into Salesforce from app-api on submission

Salesforce has a few different API options for sending data into its database from outside. We can make a REST call from app-api as part of our submission handler. This will send data into Salesforce immediately at submission time, there will be no gap. On resubmission we will send over the new data.
Copy link
Contributor

@haworku haworku Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be interested to compare actual scope between option 1 and option 2 from someone on salesfroce team experienced with implementing APIs. For a custom web app, option 1 is considerably lower scope than option 2. I wonder though how much is pre-built already into salesforce for a pub sub approach

@haworku
Copy link
Contributor

haworku commented Oct 30, 2024

@macrael I think there is an option missing from the list - pull on-demand. Specifically, Salesforce could pull data from MC-Review on button click "Refresh submissions list".

This seems considerably less effort than pub-sub. At the same time, it reduces some of the risks of doing a push on submit approach, which, besides not being extendable if we decide to add in Q&A data, has risks also for ease of testing/validation that pulling data does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants