Wednesday, September 21, 2022

#930 - OIC -> Create Customer in Fusion ERP



I have a simple use case here - customer details are entered in SFDC, OIC is invoked to create the relevant customer in Fusion ERP. In Fusion Sales we have the Accounts object, Financials uses Hub Persons / Organizations to express business relationships.

The latter can be created in Financials - I navigated via -


 

The REST APIs needed to create both types of customers are described here 










Let's look at Hub Organizations






Here is an example payload - 

{
"PartyNumber": "123456",
"SourceSystemReference": [
{
"SourceSystem": "SFDC",
"SourceSystemReferenceValue": "SFDC1234"
}
],
"OrganizationName": "Commiskey Loudspeakers Inc.",
"PartyUsageCode": "EXTERNAL_LEGAL_ENTITY",
"RawPhoneNumber": "9199199199",
"EmailAddress": "niall@commiskeyLoudspeakers.com",
"URL": "www.commiskeyLoudspeakers.com",
"Address": [
{
"AddressType": "BILL_TO",
"Address1": "1916 11th Ave",
"City": "San Francisco",
"Country": "US",
"County": "San Francisco",
"PostalCode": "94116",
"PostalPlus4Code": "",
"State": "CA"
}
],
"CorpCurrencyCode": "USD",
"CurcyConvRateType": "Corporate",
"CurrencyCode": "USD",
"DUNSNumber": "20091962"
}

Note the link to the SFDC source system. This source system code will have to exist in Fusion.











I validate in Financials -


Now back to the Postman response - 


Party Id has been generated by Fusion, the other values are self-explanatory.

Now to the Source System part of the response -


 


Finally, the Address details - 



Looks good, however, the customer isn't active from an accounting perspective until the following details have been entered - Accounts and Sites



 Here we will use the SOAP based api - 

foundationParties/CustomerAccountService

The PartyId and AddressId returned by the REST invoke will be needed here.

But first, let's create an integration in OIC for the initial customer creation. ERP adapter configuration is as follows - 




 














I then select the create option.

I used my Postman request payload as the Trigger request, so mapping is very easy - 








I activate and test -



No comments:

Post a Comment