web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

creating customer x++

(0) ShareShare
ReportReport
Posted on by 182
Hi,
 
If we have an external system that stores customers with their own account number (they don't store D365 account number) and this customer can exist in some of legal entities in d365.
so we'll store their external account number in d365 using a customized field

now If we need to create those customers in specific legal entities through integration

So they will send us:
CustAccount1, create/update in both USMF and USRT


So in d365, we need to to look for their custAccount1 in the external customized field, if we found it, then it means it's an update, and we need to update the customer in both legal entities. If we didn't find it, then it means we need to create that customer in two legal entities. (i know depending on the external ref is not accurate but that's what we have)

what is best way to do it?

A) Should we let the integration call odata first to check if the external ref exists (GET) and store d365 customerAccountNum, if found, then call odata again to update (PATCH) in two legal entites for the d365 accountNum, and if not found call odata (post) to insert in the two legal entities? (batch call: url/data/$batch)
like this
--batch_1
Content-Type: multipart/mixed; boundary="changeset_1"

--changeset_1
Content-Type: application/http
Content-Transfer-Encoding: binary
Content-ID: 1

POST CustomersV3?cross-company=true&$filter=dataAreaId eq 'UMSF' HTTP/1.1
Content-Type: application/json; type=entry

{ 
    "dataAreaId": "UMSF", 
    "customerAccount": "xx-1";
	...etc
} 

--changeset_1
Content-Type: application/http
Content-Transfer-Encoding: binary
Content-ID: 2

POST CustomersV3?cross-company=true&$filter=dataAreaId eq 'USRT' HTTP/1.1
Content-Type: application/json; type=entry

{ 
    "dataAreaId": "USRT", 
    "customerAccount": "xx-1";
	...etc
} 



--changeset_1--

--batch_1--


B) or is it better to use custom service?

where the input can be list of vendors with list of legal entities? and we do the lookup for external ref inside the service?
{
  "_vendors":
  [
    {
      "externalRef": "CustAccount1",
      "dataAreaIds":
      [
        {
          "dataAreaId": "USMF"
        },
        {
          "dataAreaId": "USRT"
        }
      ]
    },
    {
      "externalRef": "CustAccount2",
      "dataAreaIds":
      [
        {
          "dataAreaId": "USMF"
        }
      ]
    }
  ]
}


**the volume for integration should be low -- and we might need to also create customer postal address and customer contact persons, which means if we go with odata, we'll need to do different two calls to different data entities to create postal address and contact persons.
While for custom service we can do all of that in one place but not sure about performance. using odata might mean more hits to DB but short time. While doing custom service maybe the time will be more as everything in one place, but still hits to db will be the same right?
Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 660

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 654 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 489

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans