UK-Export-Finance / mdm-api

Master data management API built using NestJs
MIT License
3 stars 3 forks source link

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

Open natdeanlewissoftwire opened 5 days ago

natdeanlewissoftwire commented 5 days ago

Introduction :pencil2:

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 :heavy_check_mark:

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 :heavy_plus_sign:

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)

sonarcloud[bot] commented 3 days ago

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarCloud