Customer-Trading Party Creation using SOAP API

Customer-Trading Party Creation using SOAP API

Follow below SOAP API for creating customer-Trading Party:

(A) Create Location:

Use Below SOAP API WSDL and Payload to create Location:

SOAP WSDL:

https://fa-xxx-xxx-saasfaxxx.fa.ocs.oraclecloud.com/foundationParties/LocationService?WSDL

Method:

https://fa-xxxx-xxx-saasfaxxxx.fa.ocs.oraclecloud.com:443/crmService/FoundationPartiesLocationService

Payload:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/cdm/foundation/parties/locationService/applicationModule/types/" xmlns:loc="http://xmlns.oracle.com/apps/cdm/foundation/parties/locationService/" xmlns:par="http://xmlns.oracle.com/apps/cdm/foundation/parties/partyService/" xmlns:sour="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/sourceSystemRef/" xmlns:loc1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/location/">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:createLocation>
         <typ:location>
            <loc:Country>US</loc:Country>
            <loc:Address1>1 Test address11</loc:Address1>
            <loc:City>Columbia</loc:City>
            <loc:PostalCode>29210</loc:PostalCode>
            <loc:State>South Carolina</loc:State>
            <loc:CreatedByModule>HZ_WS</loc:CreatedByModule>
         </typ:location>
      </typ:createLocation>
   </soapenv:Body>
</soapenv:Envelope>

Location is created now.

(B) Create Customer as Party with Party Sites:

Use below SOAP API WSDL and payload to create customer as party with party Sites.

SOAP WSDL:

https://fa-xxxxx-xxxx-saasfaxxxx.fa.ocs.oraclecloud.com/foundationParties/OrganizationService?WSDL

Method:

https://fa-xxxx-xxxx-saasfaprod1.fa.ocs.oraclecloud.com:443/crmService/FoundationPartiesOrganizationService

Payload:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/cdm/foundation/parties/organizationService/applicationModule/types/" xmlns:org="http://xmlns.oracle.com/apps/cdm/foundation/parties/organizationService/" xmlns:par="http://xmlns.oracle.com/apps/cdm/foundation/parties/partyService/" xmlns:sour="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/sourceSystemRef/" xmlns:con="http://xmlns.oracle.com/apps/cdm/foundation/parties/contactPointService/" xmlns:con1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/contactPoint/" xmlns:org1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/organization/" xmlns:par1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/partySite/" xmlns:rel="http://xmlns.oracle.com/apps/cdm/foundation/parties/relationshipService/" xmlns:org2="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/orgContact/" xmlns:rel1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/relationship/">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:createOrganization>
         <typ:organizationParty>
            <org:CreatedByModule>HZ_WS</org:CreatedByModule>
            <org:OrganizationProfile>
               <org:OrganizationName>TEST CUSTOMER 001</org:OrganizationName>
               <org:CreatedByModule>HZ_WS</org:CreatedByModule>
               <org:OrigSystemReference>102379115</org:OrigSystemReference>
            </org:OrganizationProfile>
            <org:PartyUsageAssignment>
               <par:PartyUsageCode>CUSTOMER</par:PartyUsageCode>
               <par:CreatedByModule>HZ_WS</par:CreatedByModule>
            </org:PartyUsageAssignment>
            <org:PartySite>
               <par:LocationId>300000017574212</par:LocationId>
               <par:PartySiteName>TEST_PARTY_SITE</par:PartySiteName>
               <par:CreatedByModule>HZ_WS</par:CreatedByModule>
               <par:PartySiteUse>
                  <par:SiteUseType>BILL_TO</par:SiteUseType>
                  <par:CreatedByModule>HZ_WS</par:CreatedByModule>
                  <!--Zero or more repetitions:-->
               </par:PartySiteUse>
               <par:PartySiteUse>
                  <par:SiteUseType>SHIP_TO</par:SiteUseType>
                  <par:CreatedByModule>HZ_WS</par:CreatedByModule>
                  <!--Zero or more repetitions:-->
               </par:PartySiteUse>
            </org:PartySite>
         </typ:organizationParty>
      </typ:createOrganization>
   </soapenv:Body>
</soapenv:Envelope>

here in above payload, we are using Location ID created in earlier step.

Also note down the Party Site id generated from response.

We will use this Party Site id for creating Customer account.

(C) Create Customer Account and Associate Bill To and Ship To Sites:

Use below SOAP API WSDL and payload to create customer account and associate Bill to and Ship to Sites.

SOAP WSDL:

https://fa-xxxx-xxx-saasfaxxxxx.fa.ocs.oraclecloud.com/crmService/CustomerAccountService?WSDL

Method:

https://fa-XXXX-XXXX-saasfaXXXX.fa.ocs.oraclecloud.com:443/crmService/CustomerAccountService

Payload:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/cdm/foundation/parties/customerAccountService/applicationModule/types/" xmlns:cus="http://xmlns.oracle.com/apps/cdm/foundation/parties/customerAccountService/" xmlns:cus1="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/custAccountContactRole/" xmlns:par="http://xmlns.oracle.com/apps/cdm/foundation/parties/partyService/" xmlns:sour="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/sourceSystemRef/" xmlns:cus2="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/custAccountContact/" xmlns:cus3="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/custAccountRel/" xmlns:cus4="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/custAccountSiteUse/" xmlns:cus5="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/custAccountSite/" xmlns:cus6="http://xmlns.oracle.com/apps/flex/cdm/foundation/parties/custAccountSiteGdf/" xmlns:cus7="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/custAccount/" xmlns:cus8="http://xmlns.oracle.com/apps/flex/cdm/foundation/parties/custAccountGdf/">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:mergeCustomerAccount>
         <typ:customerAccount>
            <cus:PartyId>300000017574214</cus:PartyId>
            <cus:AccountNumber>TEST_CUST_ACCT_002</cus:AccountNumber>
            <cus:AccountName>TEST CUST ACCT 002</cus:AccountName>
            <cus:CreatedByModule>HZ_WS</cus:CreatedByModule>
            <cus:CustomerAccountSite>
               <cus:PartySiteId>300000017574215</cus:PartySiteId>
               <cus:CreatedByModule>HZ_WS</cus:CreatedByModule>
               <cus:SetId>300000000000170</cus:SetId>
               <cus:CustomerAccountSiteUse>
                  <cus:SiteUseCode>BILL_TO</cus:SiteUseCode>
                  <cus:CreatedByModule>HZ_WS</cus:CreatedByModule>
               </cus:CustomerAccountSiteUse>
               <cus:CustomerAccountSiteUse>
                  <cus:SiteUseCode>SHIP_TO</cus:SiteUseCode>
                  <cus:CreatedByModule>HZ_WS</cus:CreatedByModule>
               </cus:CustomerAccountSiteUse>
            </cus:CustomerAccountSite>
         </typ:customerAccount>
      </typ:mergeCustomerAccount>
   </soapenv:Body>
</soapenv:Envelope>

Login to Fusion Application.

Navigate to Receivable —-> Billing —–> Manage Customers.

We will cover more details regarding remaining TCA SOAP API in second part of this blog post.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top