Tagged: fusion

Creating a Party or Organization using REST API – Oracle Fusion 0

In the next few posts, we will try to create the TCA hierarchy objects such as Organization, Party, Party Sites, Party Site Uses, Accounts, Account Sites, Contacts etc. using Webservice (and SOAP as a tool) .

Also, the FBDI process need to be used for large data imports like master conversion process and not for daily data integration with third party systems. For daily integrations, Webservices such as SOAP or REST need to be used.

After 20D release, Organizations will be created using REST API. Accounts, Sites, Site Usage, Profile will be created using SOAP Webservices.

In this post, we will see what is the data that is required to create a Party or Organization. Later we will run few queries to see the data created in Oracle Fusion.

Use POSTMAN or some other tool to run the following REST API.

Request URL: https://xxx-your-oracle.oraclecloud.com/crmRestApi/resources/11.13.18.05/hubOrganizations

Method: POST

Payload:

{
	   "PartyNumber":"9988770",
	   "SourceSystemReference":[
		  {
			 "SourceSystem":"FranSysCustom",
			 "SourceSystemReferenceValue":"9988770LCE"
		  }
	   ],
	   "OrganizationName":"Oracle Learnings",
	   "PartyUsageCode":"EXTERNAL_LEGAL_ENTITY",
	   "RawPhoneNumber":"9199199199",
	   "EmailAddress":"send_email@oracle.com",
	   "URL":"www.oracle.com",
	   "Address":[
		  {
			 "AddressType":"BILL_TO",
			 "Address1":"1234 Sample Address1",
			 "City":"Sample City",
			 "Country":"US",
			 "County":"Oakland",
			 "PostalCode":"94065",
			 "PostalPlus4Code":"",
			 "State":"NY"
		  }
	   ],
	   "CorpCurrencyCode":"USD",
	   "CurcyConvRateType":"Corporate",
	   "CurrencyCode":"USD",
	   "DUNSNumber":"123456789"
}

Upon running this, the response will have the Party ID and Party Site ID. You can use this Party ID to further create Accounts etc.

Queries:

select * from hz_parties where party_name = 'Oracle Learnings';
select * from hz_party_sites where party_id in (select party_id from hz_parties where party_name = 'Oracle Learnings');
select * 
from hz_party_site_uses 
where party_site_id in (select party_site_id 
                        from hz_party_sites 
                        where party_id in (select party_id from hz_parties where party_name = 'Oracle Learnings'))

select * 
from hz_locations 
where location_id in (select location_id from hz_party_sites where party_id in (select party_id from hz_parties where party_name = 'Oracle Learnings'))

And thus, your Organization / Party, Party Site, Party Site Use, Location is created with a single call to the REST API.

Update Receipt Method on AR Invoice 0

The following Webservice code can be used to Update Receipt Method on the AR Invoice. Some of the conditions that are required are that the Invoice need to be in Complete Status. The Complete button should be in enabled status. That is, if a receipt is applied on the invoice, then we cannot modify the Receipt Method on the Invoice.

Get the Customer Transaction ID for the Invoice using the following query:

select customer_trx_id from ra_customer_trx_all where trx_number = <ar_invoice_number>; 

WSDL used is: https://xxx-your-oracleserver.oraclecloud.com/fscmService/StandardReceiptService?WSDL

Code to update the Receipt Method is:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/types/" xmlns:inv="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/" xmlns:typ1="http://xmlns.oracle.com/adf/svc/types/">
<soapenv:Header/>
<soapenv:Body>
   <typ:processUpdateCCToken>
      <typ:changeOperation>Create</typ:changeOperation>
      <!--Zero or more repetitions:-->
      <typ:updateCCToken>
      <inv:CustomerTrxId>9999938381</inv:CustomerTrxId>
      <inv:ReceiptMethod>New Receipt Method Name</inv:ReceiptMethod>
   </typ:updateCCToken>
      <typ:processControl>
         <typ1:partialFailureAllowed>true</typ1:partialFailureAllowed>
      </typ:processControl>
   </typ:processUpdateCCToken>
</soapenv:Body>
</soapenv:Envelope>