Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Add an arbitrary map of ID's (foreign keys) on Customer #7

Closed
adamdecaf opened this issue May 10, 2019 · 4 comments
Closed

Add an arbitrary map of ID's (foreign keys) on Customer #7

adamdecaf opened this issue May 10, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@adamdecaf
Copy link
Member

adamdecaf commented May 10, 2019

We need to allow and store an arbitrary map of ID's (salesforceId, etc) to centralize lookups and foreign key relationships. This helps integrate external services with this project by offering one location to store all relationships with a customer.

Notes: #9

@adamdecaf adamdecaf added the enhancement New feature or request label May 10, 2019
@wadearnold
Copy link
Member

The map of ID's would allow the Customer to know which products are associated with the CustomerID

{"salesforceID": "00530000000ibYc", "paygateID": "00530000000ibYc"}

I still have a question on mapping to accounts in GL. A Customer can have several accounts. Do we want to allow for duplicate name keys in the map?

[{"accountID": "cdd71036-3fff-4a22-b364-20bd0c284cb3"}, {"accountID": "cdd71036-3fff-4a22-b364-20bd0c284cb3"}]

Here we can have multiple of the same Key. Maybe Accounts is such a common use case with severalaccountID that we make it's own property?

@adamdecaf
Copy link
Member Author

I wasn't going to store GL account IDs in this map. Instead I was going to keep GL having routes like /customers/:id/accounts.

@wadearnold
Copy link
Member

Got it. As always I like your ideas better.

@adamdecaf adamdecaf self-assigned this May 29, 2019
@adamdecaf
Copy link
Member Author

adamdecaf commented May 29, 2019

Oh, if callers want to store multiple ID's they can do so in their own format. I assume most systems would use , but some use | or other delimiters.

adamdecaf added a commit to adamdecaf/customers that referenced this issue May 29, 2019
adamdecaf added a commit to adamdecaf/customers that referenced this issue May 29, 2019
adamdecaf added a commit to adamdecaf/customers that referenced this issue May 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants