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): automate new DTFS customer creation in Salesforce (D&B service only) #1130

Merged
merged 23 commits into from
Jan 8, 2025

Conversation

natdeanlewissoftwire
Copy link
Contributor

@natdeanlewissoftwire natdeanlewissoftwire commented Jan 6, 2025

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 adds the Dun and Bradstreet service, and an endpoint to allow us to GET a company from Dun and Bradstreet by their registration number (in our case Companies House Number). This will then be used by this PR as part of the customer creation process.

Miscellaneous ➕

To be merged before the remainder of the customer creation endpoint.

Also adds a user facing D&B endpoint, viewable in the Swagger docs:
image

Copy link
Contributor

@abhi-markan abhi-markan left a comment

Choose a reason for hiding this comment

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

Thanks @natdeanlewissoftwire looks good have few questions:

  1. Should an API test also be added to perform an actual API call.
  2. What is the MDM endpoint for this external call please?

@natdeanlewissoftwire
Copy link
Contributor Author

natdeanlewissoftwire commented Jan 6, 2025

Thanks @abhi-markan:

Should an API test also be added to perform an actual API call.

I think we should avoid this if possible as there's a limit on the number of calls we can make to the API in our plan (a few thousand iirc). Is there a standard practice that's followed in the codebase? Most of the codebases I've worked on mock this sort of external API test and trust the external provider to handle testing their endpoint, though I appreciate that comes with drawbacks on our end.

What is the MDM endpoint for this external call please?

There's actually no public endpoint for this, as it'll be encapsulated in the larger CreateOrGetParty endpoint (on '/customers' POST method). This will hopefully be apparent in the PR to follow this one! I did make a temporary endpoint in the swagger while I was testing this locally but it's not necessary to include here imo.

src/modules/customers/customers.service.ts Outdated Show resolved Hide resolved
src/modules/customers/customers.service.ts Outdated Show resolved Hide resolved
Copy link

sonarqubecloud bot commented Jan 8, 2025

Copy link
Contributor

@abhi-markan abhi-markan left a comment

Choose a reason for hiding this comment

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

One minor comment please.

@abhi-markan abhi-markan merged commit 8a6403c into main Jan 8, 2025
19 of 20 checks passed
@abhi-markan abhi-markan deleted the feat/FN-3163/create-customer-endpoint-dnb-service branch January 8, 2025 10:09
abhi-markan added a commit that referenced this pull request Jan 17, 2025
🤖 I have created a release *beep* *boop*
---


##
[1.23.0](v1.22.2...v1.23.0)
(2025-01-17)


### Features

* **FN-3163:** add get or create customer endpoint
([#1132](#1132))
([73a5b2a](73a5b2a))
* **FN-3163:** automate new DTFS customer creation in Salesforce (D&B
service only)
([#1130](#1130))
([8a6403c](8a6403c))


### Bug Fixes

* **deps:** replace all
([#1133](#1133))
([8454434](8454434))
* **deps:** update all to v4 (major)
([#1148](#1148))
([e9be73b](e9be73b))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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