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

feat(FN-3163): MDM endpoints for automatically creating new DTFS customers in Salesforce #1057

Draft
wants to merge 54 commits into
base: main
Choose a base branch
from

Conversation

natdeanlewissoftwire
Copy link

@natdeanlewissoftwire natdeanlewissoftwire commented Nov 8, 2024

Introduction ✏️

As part of the CCM project, if a customer does exist in SF, we are automatically creating it rather than relying on the manual process currently undertaken by Business Support Group. DTFS will send requests to a new customer/salesforce endpoint for MDM to create a customer in Salesforce. Technical documentation of this process is here

The corresponding feature-flagged DTFS pull request is here.

Resolution ✔️

This PR updates the customer controller in two ways: It adds a direct-to-salesforce GET that replaces the existing via-Informatica get in line with UKEF's long-term policy to move away from Informatica.
It also adds a customer creation endpoint that does a few things:
Generates a URN from NUMGEN,
Calls the new Dun and Bradstreet service (in a separate PR, here) to get a customer's DUNS number.
POSTs these along with the customer name and Companies House Number to Salesforce.

Miscellaneous ➕

A tweak to the NUMGEN regex to allow customer URN creation, and a typo fix.
To be merged after this PR (diff will be smaller once that one's merged, so probably not worth reviewing this one before looking at that one first)

// to ignore https issues, enable agent and rejectUnauthorized:false bellow.
httpsAgent: new https.Agent({
// Allow self signed negotiations
// rejectUnauthorized: false,
Copy link
Author

@natdeanlewissoftwire natdeanlewissoftwire Nov 11, 2024

Choose a reason for hiding this comment

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

This needs to be uncommented to work locally (due to a self-signed certificate in certificate chain: error) but on prod it should work fine... I'm not that happy with this state of things so if there's a better way that allows it to work everywhere without tweaking the code that'd be ideal.

Copy link

sonarcloud bot commented Nov 11, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarCloud

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.

1 participant