Create Customer Rest API in Oracle Fusion

With Release 20D we can use rest api to create Customers in Oracle Fusion SaaS. Use the followig payloads to create customers into fusion when we are integrating application or loading data in fusion. In fact you need to use it in combination of SOAP service to make the customer transactable.

Outline Steps

We need to execute the below rest and soap services to create a customer record in ERP Cloud.

New REST API is available for Organization & Person (Location and Organization/Person records gets created in one payload/call)

  • REST API’s

1.Create Organization

/crmRestApi/resources/11.13.18.05/hubOrganizations

  • SOAP Web Services

2. Create Customer Account with Site & Use

foundationParties/CustomerAccountService

3. Create Customer Account Profile

fscmService/ReceivablesCustomerProfileService

The web service is a Create Customer Rest API in Oracle Fusion

1- For Creating Organization

/crmRestApi/resources/11.13.18.05/hubOrganizations

Sample Payload

{

"PartyNumber": "6789543254",

"SourceSystemReference": [

{

"SourceSystem": "RNOW",

"SourceSystemReferenceValue": "S2A2P224"

}

],

"OrganizationName": "WPS Org",

"PartyUsageCode": "EXTERNAL_LEGAL_ENTITY",

"RawPhoneNumber": "9199199199",

"EmailAddress": "idc@oracle.com",

"URL": "www.oracle.com",

"Address": [

{

"AddressType": "BILL_TO",

"Address1": "500 Oracle Parkway",

"City": "Redwood Shores",

"Country": "US",

"County": "San Mateo",

"PostalCode": "94065",

"PostalPlus4Code": "",

"State": "CA"

}

],

"CorpCurrencyCode": "USD",

"CurcyConvRateType": "Corporate",

"CurrencyCode": "USD",

"DUNSNumber": "123456789"

}

Make sure the Source system exists in the Fusion system

RESPONSE Payload JSON

{
    "PartyId": 300000248939071,
    "PartyNumber": "67895432554",
    "SourceSystem": null,
    "SourceSystemReferenceValue": null,
    "OrganizationName": "IDC Org4",
    "UniqueNameSuffix": null,
    "Status": "A",
    "CreatedByModule": "ORA_ZCH_WS",
    "CreatedBy": "CRM_IMPL",
    "CreationDate": "2022-08-30T12:45:12.001+00:00",
    "LastUpdateDate": "2022-08-30T12:45:15.309+00:00",
    "LastUpdatedBy": "CRM_IMPL",
    "PartyUsageCode": "EXTERNAL_LEGAL_ENTITY",
    "RawPhoneNumber": "9199199199",
    "PhoneVerificationStatus": null,
    "PhoneVerificationDate": null,
    "EmailAddress": "idc@oracle.com",
    "EmailVerificationStatus": null,
    "EmailVerificationDate": null,
    "URL": "www.oracle.com",
    "AddressNumber": null,
    "AddressElementAttribute1": null,
    "AddressElementAttribute2": null,
    "AddressElementAttribute3": null,
    "AddressElementAttribute4": null,
    "AddressElementAttribute5": null,
    "Address1": null,
    "Address2": null,
    "Address3": null,
    "Address4": null,
    "AddressLinesPhonetic": null,
    "AddressType": null,
    "Building": null,
    "City": null,
    "Country": null,
    "County": null,
    "FloorNumber": null,
    "Mailstop": null,
    "PostalCode": null,
    "PostalPlus4Code": null,
    "Province": null,
    "State": null,
    "ThirdPartyFlag": null,
    "ValidatedFlag": null,
    "AccountScore": null,
    "AccountScoringTier": null,
    "AnalysisFiscalYear": null,
    "BankCode": null,
    "BankOrBranchNumber": null,
    "BranchCode": null,
    "BranchFlag": null,
    "BusinessScope": null,
    "CEOName": null,
    "CEOTitle": null,
    "CertificationLevel": null,
    "CertificationReasonCode": null,
    "CleanlinessScore": null,
    "Comments": null,
    "CompletenessScore": null,
    "CongressionalDistrictCode": null,
    "ControlYear": null,
    "CorpCurrencyCode": "USD",
    "CorporationClass": null,
    "CurcyConvRateType": "Corporate",
    "CurrencyCode": "USD",
    "CurrentFiscalYearPotentialRevenueAmount": null,
    "DataCloudStatus": null,
    "DataConfidenceScore": null,
    "DatafoxCompanyId": null,
    "Description": null,
    "DisadvantageIndicator": null,
    "DisplayedDUNSPartyId": null,
    "DomesticUltimateDUNSNumber": null,
    "DoNotConfuseWith": null,
    "DUNSNumber": "123456781",
    "DUNSCreditRating": null,
    "DuplicateIndicator": null,
    "DuplicateScore": null,
    "EmployeesAtPrimaryAddress": null,
    "EmployeesAtPrimaryAddressEstimation": null,
    "EmployeesAtPrimaryAddressMinimum": null,
    "EmployeesAtPrimaryAddressText": null,
    "EmployeesTotal": null,
    "EnquiryDUNS": null,
    "EnrichmentScore": null,
    "ExportIndicator": null,
    "FiscalYearendMonth": null,
    "GlobalUltimateDUNSNumber": null,
    "GrowthStrategyDescription": null,
    "GeneralServicesAdministrationFlag": null,
    "HomeCountry": null,
    "HQBranchIndicator": null,
    "ImportIndicator": null,
    "Keywords": null,
    "LaborSurplusIndicator": null,
    "LastEnrichmentDate": null,
    "LastScoreUpdateDate": null,
    "LegalStatus": null,
    "LineOfBusiness": null,
    "LocalActivityCode": null,
    "LocalActivityCodeType": null,
    "LocalBusinessIdentifier": null,
    "LocalBusinessIdentifierType": null,
    "MinorityOwnedIndicator": null,
    "MinorityOwnedType": null,
    "MissionStatement": null,
    "NextFiscalYearPotentialRevenueAmount": null,
    "OutOfBusinessIndicator": null,
    "OrganizationSize": "LARGE",
    "OrganizationType": null,
    "ParentDUNSNumber": null,
    "ParentOrSubsidiaryIndicator": null,
    "PreferredFunctionalCurrency": null,
    "PreferredContactMethod": null,
    "PrincipalName": null,
    "PrincipalTitle": null,
    "PublicPrivateOwnershipFlag": null,
    "RecencyScore": null,
    "RegistrationType": null,
    "RentOrOwnIndicator": null,
    "SmallBusinessIndicator": null,
    "StockSymbol": null,
    "TaxpayerIdentificationNumber": null,
    "TotalEmployeesEstimatedIndicator": null,
    "TotalEmployeesIndicator": null,
    "TotalEmployeesMinimumIndicator": null,
    "TotalEmployeesText": null,
    "TotalPaymentAmount": null,
    "TradingPartnerIdentifier": null,
    "UniqueNameAlias": "IDC Org4",
    "ValidityScore": null,
    "WomanOwnedIndicator": null,
    "YearEstablished": null,
    "YearIncorporated": null,
    "OrganizationDEO_CustomerType_c": "Business",
    "OrganizationDEO_CustomerType_cMeaning": null,
    "OrganizationDEO_StrategicPlan_Id_c": null,
    "OrganizationDEO_StrategicPlan_c": null,
    "OrganizationDEO_StrategicContact_Id_c": null,
    "OrganizationDEO_StrategicContact_c": null,
    "OrganizationDEO_AccountPlanStatus_c": null,
    "OrganizationDEO_AccountPlanStatus_cMeaning": null,
    "OrganizationDEO_PlanManagerCalc_c": null,
    "OrganizationDEO_Industry_c": null,
    "OrganizationDEO_LSNumberOfBeds_c": null,
    "OrganizationDEO_LSNumberOfPhysicians_c": null,
    "OrganizationDEO_LSCallFrequency_c": null,
    "OrganizationDEO_LSRoute_c": null,
    "OrganizationDEO_LSRoute_cMeaning": null,
    "OrganizationDEO_LSAccountType_c": null,
    "OrganizationDEO_LSAccountType_cMeaning": null,
    "OrganizationDEO_InstitutionType_c": null,
    "OrganizationDEO_InstitutionType_cMeaning": null,
    "OrganizationDEO_DaaSTwitterProfileURL_c": null,
    "OrganizationDEO_DaaSTwitterFollowers_c": null,
    "OrganizationDEO_DaaSYouTubeURL_c": null,
    "OrganizationDEO_DaaSFaceBookURL_c": null,
    "OrganizationDEO_DaaSYouTubeViews_c": null,
    "OrganizationDEO_CurrentSatisfactionLevel_c": null,
    "OrganizationDEO_CurrentlyReferring_c": null,
    "OrganizationDEO_Latitude_c": null,
    "OrganizationDEO_Longitude_c": null,
    "OrganizationDEO_DaaSFacebookProfileURL_c": null,
    "OrganizationDEO_ExtnZcmFuseEditCustomerContainerLayout_BPAccountLayout_1513292945122Expr": "true",
    "OrganizationDEO_ExtnZcmFuseEditCustomerContainerLayout_AccountBusinessPlanLayout_1515002954905Expr": "true",
    "OrganizationDEO_XSD_c": "XSD",
    "OrganizationDEO_AccountScore_c": null,
    "OrganizationDEO_DatafoxCompanyId_c": null,
    "OrganizationDEO_DatafoxCompanyLegalName_c": null,
    "OrganizationDEO_DatafoxKeywords_c": null,
    "OrganizationDEO_DatafoxCompanyURL_c": null,
    "OrganizationDEO_AccountTier_c": null,
    "OrganizationDEO_Score_c": null,
    "OrganizationDEO_TotalOpenOpportunities_c": "0",
    "OrganizationDEO_OpenOpportunityRevenue_c": "$0.00",
    "SourceSystemReference": [
        {
            "SourceSystemReferenceId": 300000248939076,
            "PartyId": 300000248939071,
            "PartyNumber": "67895432554",
            "PartySourceSystem": "RNOW",
            "PartySourceSystemReferenceValue": "S2A2P2254",
            "SourceSystem": "RNOW",
            "SourceSystemReferenceValue": "S2A2P2254",
            "Status": "A",
            "StartDate": "2022-08-30",
            "EndDate": "4712-12-31",
            "CreatedBy": "CRM_IMPL",
            "CreatedByModule": "HZ_WS",
            "CreationDate": "2022-08-30T12:45:12.805+00:00",
            "LastUpdateDate": "2022-08-30T12:45:14.289+00:00",
            "LastUpdateLogin": "E73282E8135A9DE3E0532F64F00A8D89",
            "LastUpdatedBy": "CRM_IMPL",
            "ObjectVersionNumber": 1,
            "ConflictId": 0
        }
    ],
    "Address": [
        {
            "PartyId": 300000248939071,
            "PartyNumber": "67895432554",
            "PartySourceSystem": "RNOW",
            "PartySourceSystemReferenceValue": "S2A2P2254",
            "AddressId": 300000248939077,
            "AddressNumber": "1188330",
            "Comments": null,
            "ObjectVersionNumber": 1,
            "DoNotMailFlag": false,
            "CorpCurrencyCode": "USD",
            "CreatedBy": "CRM_IMPL",
            "CreatedByModule": "HZ_WS",
            "CreationDate": "2022-08-30T12:45:12.815+00:00",
            "CurcyConvRateType": "Corporate",
            "CurrencyCode": "USD",
            "EndDateActive": "4712-12-31",
            "FormattedAddress": "500 Oracle Parkway,REDWOOD SHORES, CA 94065 San Mateo",
            "FormattedMultilineAddress": "500 Oracle Parkway<BR>REDWOOD SHORES, CA 94065 San Mateo",
            "LastUpdateDate": "2022-08-30T12:45:16.190+00:00",
            "LastUpdateLogin": "E73282E8135A9DE3E0532F64F00A8D89",
            "LastUpdatedBy": "CRM_IMPL",
            "LocationId": 300000248939078,
            "Mailstop": null,
            "PrimaryFlag": true,
            "StartDateActive": "2022-08-30",
            "Status": "A",
            "AddrElementAttribute1": null,
            "ObjectVersionNumber1": 1,
            "AddrElementAttribute2": null,
            "AddrElementAttribute3": null,
            "AddrElementAttribute4": null,
            "AddrElementAttribute5": null,
            "Address1": "500 Oracle Parkway",
            "Address2": null,
            "Address3": null,
            "Address4": null,
            "AddressLinesPhonetic": null,
            "Building": null,
            "CalculateFormattedAddress": "false",
            "City": "Redwood Shores",
            "ClliCode": null,
            "Country": "US",
            "County": "San Mateo",
            "DateValidated": null,
            "Description": null,
            "FloorNumber": null,
            "FormattedAddress1": "500 Oracle Parkway,REDWOOD SHORES, CA 94065 San Mateo",
            "FormattedMultilineAddress1": "500 Oracle Parkway<BR>REDWOOD SHORES, CA 94065 San Mateo",
            "HouseType": null,
            "Latitude": null,
            "LocationDirections": null,
            "Longitude": null,
            "PostalCode": "94065",
            "PostalPlus4Code": "",
            "Province": null,
            "State": "CA",
            "ValidatedFlag": false,
            "ValidationStartDate": null,
            "ValidationStatusCode": null,
            "SourceSystem": null,
            "SourceSystemReferenceValue": null,
            "SSROwnerTableName": null,
            "EffectiveDate": null,
            "SSRPartyOwnerTableName": "HZ_PARTIES",
            "CreatedByModule1": "HZ_WS",
            "AddressType": "BILL_TO",
            "ConflictId": 0,
            "DoNotValidateFlag": null,
            "DunsNumberC": null,
            "PartySiteName": null,
            "PartySiteEO_XSD_c": "XSD"
        }
    ]
    ]
}

Customer Organization and Address records get created( Party id and Addressid) with the above REST call. From the RESPONSE Payload , Use PartyId and AddressId  and pass it to the below create customer account SOAP service

2. Query one customer in fusion by Customer Name

/crmRestApi/resources/11.13.18.05/hubOrganizations?q=OrganizationName= “Brindell”& onlyData=true

Use parameter onlyData =true to get response without links

{
    "items": [
        {
            "PartyId": 300000113922518,
            "PartyNumber": "320893",
            "SourceSystem": "RNOW",
            "SourceSystemReferenceValue": "1",
            "OrganizationName": "Brindell",
            "UniqueNameSuffix": null,
            "Status": "A",
            "CreatedByModule": "ZCM",
            "CreatedBy": "JOHN.DUNBAR",
            "CreationDate": "2015-08-21T09:22:08.358+00:00",
            "LastUpdateDate": "2019-05-15T20:27:29.001+00:00",
            "LastUpdatedBy": "JOHN.DUNBAR",
            "PartyUsageCode": "SALES_ACCOUNT",
            "RawPhoneNumber": "1-415-8938383",
            "PhoneVerificationStatus": null,
            "PhoneVerificationDate": null,
            "EmailAddress": null,
            "EmailVerificationStatus": null,
            "EmailVerificationDate": null,
            "URL": null,
            "AddressNumber": "416122",
            "AddressElementAttribute1": null,
            "AddressElementAttribute2": null,
            "AddressElementAttribute3": null,
            "AddressElementAttribute4": null,
            "AddressElementAttribute5": null,
            "Address1": "890 Market Street",
            "Address2": null,
            "Address3": null,
            "Address4": null,
            "AddressLinesPhonetic": null,
            "AddressType": "SELL_TO",
            "Building": null,
            "City": "San Francisco",
            "Country": "US",
            "County": null,
            "FloorNumber": null,
            "Mailstop": null,
            "PostalCode": "94102",
            "PostalPlus4Code": null,
            "Province": null,
            "State": "CA",
            "ThirdPartyFlag": null,
            "ValidatedFlag": null,
            "AccountScore": null,
            "AccountScoringTier": null,
            "AnalysisFiscalYear": null,
            "BankCode": null,
            "BankOrBranchNumber": null,
            "BranchCode": null,
            "BranchFlag": null,
            "BusinessScope": null,
            "CEOName": null,
            "CEOTitle": null,
            "CertificationLevel": null,
            "CertificationReasonCode": null,
            "CleanlinessScore": null,
            "Comments": null,
            "CompletenessScore": null,
            "CongressionalDistrictCode": null,
            "ControlYear": null,
            "CorpCurrencyCode": "USD",
            "CorporationClass": null,
            "CurcyConvRateType": "Corporate",
            "CurrencyCode": "USD",
            "CurrentFiscalYearPotentialRevenueAmount": null,
            "DataCloudStatus": null,
            "DataConfidenceScore": null,
            "DatafoxCompanyId": null,
            "Description": null,
            "DisadvantageIndicator": null,
            "DisplayedDUNSPartyId": null,
            "DomesticUltimateDUNSNumber": null,
            "DoNotConfuseWith": null,
            "DUNSNumber": null,
            "DUNSCreditRating": null,
            "DuplicateIndicator": null,
            "DuplicateScore": null,
            "EmployeesAtPrimaryAddress": null,
            "EmployeesAtPrimaryAddressEstimation": null,
            "EmployeesAtPrimaryAddressMinimum": null,
            "EmployeesAtPrimaryAddressText": null,
            "EmployeesTotal": null,
            "EnquiryDUNS": null,
            "EnrichmentScore": null,
            "ExportIndicator": null,
            "FiscalYearendMonth": null,
            "GlobalUltimateDUNSNumber": null,
            "GrowthStrategyDescription": null,
            "GeneralServicesAdministrationFlag": null,
            "HomeCountry": null,
            "HQBranchIndicator": null,
            "ImportIndicator": null,
            "Keywords": null,
            "LaborSurplusIndicator": null,
            "LastEnrichmentDate": null,
            "LastScoreUpdateDate": null,
            "LegalStatus": null,
            "LineOfBusiness": null,
            "LocalActivityCode": null,
            "LocalActivityCodeType": null,
            "LocalBusinessIdentifier": null,
            "LocalBusinessIdentifierType": null,
            "MinorityOwnedIndicator": null,
            "MinorityOwnedType": null,
            "MissionStatement": null,
            "NextFiscalYearPotentialRevenueAmount": null,
            "OutOfBusinessIndicator": null,
            "OrganizationSize": "LARGE",
            "OrganizationType": null,
            "ParentDUNSNumber": null,
            "ParentOrSubsidiaryIndicator": null,
            "PreferredFunctionalCurrency": null,
            "PreferredContactMethod": null,
            "PrincipalName": null,
            "PrincipalTitle": null,
            "PublicPrivateOwnershipFlag": null,
            "RecencyScore": null,
            "RegistrationType": null,
            "RentOrOwnIndicator": null,
            "SmallBusinessIndicator": null,
            "StockSymbol": null,
            "TaxpayerIdentificationNumber": null,
            "TotalEmployeesEstimatedIndicator": null,
            "TotalEmployeesIndicator": null,
            "TotalEmployeesMinimumIndicator": null,
            "TotalEmployeesText": null,
            "TotalPaymentAmount": null,
            "TradingPartnerIdentifier": null,
            "UniqueNameAlias": "Brindell",
            "ValidityScore": null,
            "WomanOwnedIndicator": null,
            "YearEstablished": null,
            "YearIncorporated": null,
            "OrganizationDEO_CustomerType_c": "1",
            "OrganizationDEO_CustomerType_cMeaning": "Business",
            "OrganizationDEO_StrategicPlan_Id_c": null,
            "OrganizationDEO_StrategicPlan_c": null,
            "OrganizationDEO_StrategicContact_Id_c": null,
            "OrganizationDEO_StrategicContact_c": null,
            "OrganizationDEO_AccountPlanStatus_c": null,
            "OrganizationDEO_AccountPlanStatus_cMeaning": null,
            "OrganizationDEO_PlanManagerCalc_c": null,
            "OrganizationDEO_Industry_c": null,
            "OrganizationDEO_LSNumberOfBeds_c": null,
            "OrganizationDEO_LSNumberOfPhysicians_c": null,
            "OrganizationDEO_LSCallFrequency_c": null,
            "OrganizationDEO_LSRoute_c": null,
            "OrganizationDEO_LSRoute_cMeaning": null,
            "OrganizationDEO_LSAccountType_c": null,
            "OrganizationDEO_LSAccountType_cMeaning": null,
            "OrganizationDEO_InstitutionType_c": null,
            "OrganizationDEO_InstitutionType_cMeaning": null,
            "OrganizationDEO_DaaSTwitterProfileURL_c": null,
            "OrganizationDEO_DaaSTwitterFollowers_c": null,
            "OrganizationDEO_DaaSYouTubeURL_c": null,
            "OrganizationDEO_DaaSFaceBookURL_c": null,
            "OrganizationDEO_DaaSYouTubeViews_c": null,
            "OrganizationDEO_CurrentSatisfactionLevel_c": null,
            "OrganizationDEO_CurrentlyReferring_c": null,
            "OrganizationDEO_Latitude_c": 37.78452,
            "OrganizationDEO_Longitude_c": -122.40739,
            "OrganizationDEO_DaaSFacebookProfileURL_c": null,
            "OrganizationDEO_ExtnZcmFuseEditCustomerContainerLayout_BPAccountLayout_1513292945122Expr": "true",
            "OrganizationDEO_ExtnZcmFuseEditCustomerContainerLayout_AccountBusinessPlanLayout_1515002954905Expr": "true",
            "OrganizationDEO_XSD_c": null,
            "OrganizationDEO_AccountScore_c": "272 (Tier 2)",
            "OrganizationDEO_DatafoxCompanyId_c": null,
            "OrganizationDEO_DatafoxCompanyLegalName_c": null,
            "OrganizationDEO_DatafoxKeywords_c": null,
            "OrganizationDEO_DatafoxCompanyURL_c": null,
            "OrganizationDEO_AccountTier_c": null,
            "OrganizationDEO_Score_c": null,
            "OrganizationDEO_TotalOpenOpportunities_c": "0",
            "OrganizationDEO_OpenOpportunityRevenue_c": "$0.00"
        }
    ],
    "count": 1,
    "hasMore": false,
    "limit": 25,
    "offset": 0
}

Customer Organization and Address records get created with the above REST call. From the RESPONSE Payload , Use PartyId and AddressId  and pass it to the below create customer account SOAP service

3. Creating Customer Account

To crate a customer Organization Account we need to call the SOAP service

https://fusiondomain.com/crmService/CustomerAccountService

SOAP 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/cdm/foundation/parties/flex/custAccount/">
   <soapenv:Header/>
   <soapenv:Body>
         <typ:createCustomerAccount>

         <typ:customerAccount>

            <cus:PartyId>300000262249842</cus:PartyId>

            <cus:AccountName>Oracle Customer</cus:AccountName>      

            <cus:AccountNumber>78901233121</cus:AccountNumber>

            <cus:CustomerType>R</cus:CustomerType>

            <cus:CustomerClassCode>CONSUMER</cus:CustomerClassCode>

            <cus:AccountEstablishedDate>2022-09-01</cus:AccountEstablishedDate>

            <cus:CreatedByModule>HZ_WS</cus:CreatedByModule>

            <cus:CustomerAccountSite>

               <cus:PartySiteId>300000262249848</cus:PartySiteId>

               <cus:CreatedByModule>HZ_WS</cus:CreatedByModule>

               <cus:SetId>300000046981965</cus:SetId>

               <cus:StartDate>2022-09-01</cus:StartDate>

               <cus:CustomerAccountSiteUse>

                  <cus:SiteUseCode>BILL_TO</cus:SiteUseCode>

                  <cus:CreatedByModule>HZ_WS</cus:CreatedByModule>

               </cus:CustomerAccountSiteUse>

            </cus:CustomerAccountSite>

         </typ:customerAccount>

      </typ:createCustomerAccount>
   </soapenv:Body>
</soapenv:Envelope>

Response

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
   <env:Header>
      <wsa:Action>http://xmlns.oracle.com/apps/cdm/foundation/parties/customerAccountService/applicationModule/CustomerAccountService/createCustomerAccountResponse</wsa:Action>
      <wsa:MessageID>urn:uuid:bb08d80c-2a5c-4a07-861d-756b74694037</wsa:MessageID>
   </env:Header>
   <env:Body>
      <ns0:createCustomerAccountResponse xmlns:ns0="http://xmlns.oracle.com/apps/cdm/foundation/parties/customerAccountService/applicationModule/types/">
         <ns0:result xsi:type="ns2:CustomerAccountResult" xmlns:ns4="http://xmlns.oracle.com/apps/cdm/foundation/parties/partyService/" xmlns:ns9="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/custAccount/" xmlns:ns2="http://xmlns.oracle.com/apps/cdm/foundation/parties/customerAccountService/" xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/" xmlns:ns1="http://xmlns.oracle.com/adf/svc/types/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <ns2:Value>
               <ns2:CustomerAccountId>300000262249863</ns2:CustomerAccountId>
               <ns2:PartyId>300000262249842</ns2:PartyId>
               <ns2:LastUpdateDate>2022-09-01T12:09:05.13Z</ns2:LastUpdateDate>
               <ns2:AccountNumber>78901233121</ns2:AccountNumber>
               <ns2:LastUpdatedBy>FIN_IMPL</ns2:LastUpdatedBy>
               <ns2:CreationDate>2022-09-01T12:09:05Z</ns2:CreationDate>
               <ns2:CreatedBy>FIN_IMPL</ns2:CreatedBy>
               <ns2:LastUpdateLogin>E7322B7916B97A00E0532560F00A7CB5</ns2:LastUpdateLogin>
               <ns2:RequestId xsi:nil="true"/>
               <ns2:OrigSystem xsi:nil="true"/>
               <ns2:OrigSystemReference>300000262249863</ns2:OrigSystemReference>
               <ns2:Status>A</ns2:Status>
               <ns2:CustomerType>R</ns2:CustomerType>
               <ns2:CustomerClassCode>CONSUMER</ns2:CustomerClassCode>
               <ns2:TaxCode xsi:nil="true"/>
               <ns2:TaxHeaderLevelFlag xsi:nil="true"/>
               <ns2:TaxRoundingRule xsi:nil="true"/>
               <ns2:CoterminateDayMonth xsi:nil="true"/>
               <ns2:AccountEstablishedDate>2022-09-01</ns2:AccountEstablishedDate>
               <ns2:AccountTerminationDate>4712-12-31</ns2:AccountTerminationDate>
               <ns2:HeldBillExpirationDate xsi:nil="true"/>
               <ns2:HoldBillFlag>false</ns2:HoldBillFlag>
               <ns2:AccountName>Oracle Customer</ns2:AccountName>
               <ns2:DepositRefundMethod xsi:nil="true"/>
               <ns2:NpaNumber xsi:nil="true"/>
               <ns2:SourceCode xsi:nil="true"/>
               <ns2:Comments xsi:nil="true"/>
               <ns2:DateTypePreference xsi:nil="true"/>
               <ns2:ArrivalsetsIncludeLinesFlag xsi:nil="true"/>
               <ns2:StatusUpdateDate xsi:nil="true"/>
               <ns2:AutopayFlag xsi:nil="true"/>
               <ns2:LastBatchId xsi:nil="true"/>
               <ns2:CreatedByModule>HZ_WS</ns2:CreatedByModule>
               <ns2:SellingPartyId xsi:nil="true"/>
               <ns2:CustomerAccountSite xmlns:ns7="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/custAccountSite/">
                  <ns2:CustomerAccountSiteId>300000262249864</ns2:CustomerAccountSiteId>
                  <ns2:CustomerAccountId>300000262249863</ns2:CustomerAccountId>
                  <ns2:PartySiteId>300000262249848</ns2:PartySiteId>
                  <ns2:LastUpdateDate>2022-09-01T12:09:05.229Z</ns2:LastUpdateDate>
                  <ns2:LastUpdatedBy>FIN_IMPL</ns2:LastUpdatedBy>
                  <ns2:CreationDate>2022-09-01T12:09:05.017Z</ns2:CreationDate>
                  <ns2:CreatedBy>FIN_IMPL</ns2:CreatedBy>
                  <ns2:LastUpdateLogin>E7322B7916B97A00E0532560F00A7CB5</ns2:LastUpdateLogin>
                  <ns2:RequestId xsi:nil="true"/>
                  <ns2:OrigSystemReference>300000262249864</ns2:OrigSystemReference>
                  <ns2:Status>A</ns2:Status>
                  <ns2:BillToIndicator>P</ns2:BillToIndicator>
                  <ns2:MarketIndicator>N</ns2:MarketIndicator>
                  <ns2:ShipToIndicator>N</ns2:ShipToIndicator>
                  <ns2:CustomerCategoryCode xsi:nil="true"/>
                  <ns2:Language xsi:nil="true"/>
                  <ns2:KeyAccountFlag xsi:nil="true"/>
                  <ns2:TpHeaderId xsi:nil="true"/>
                  <ns2:EceTpLocationCode xsi:nil="true"/>
                  <ns2:TranslatedCustomerName xsi:nil="true"/>
                  <ns2:CreatedByModule>HZ_WS</ns2:CreatedByModule>
                  <ns2:SetId>300000046981965</ns2:SetId>
                  <ns2:StartDate>2022-09-01</ns2:StartDate>
                  <ns2:EndDate>4712-12-31</ns2:EndDate>
                  <ns2:SetCode>US1BUSET</ns2:SetCode>
                  <ns2:CustomerAccountSiteUse xmlns:ns6="http://xmlns.oracle.com/apps/cdm/foundation/parties/flex/custAccountSiteUse/">
                     <ns2:SiteUseId>300000262249865</ns2:SiteUseId>
                     <ns2:CustomerAccountSiteId>300000262249864</ns2:CustomerAccountSiteId>
                     <ns2:LastUpdateDate>2022-09-01T12:09:05.337Z</ns2:LastUpdateDate>
                     <ns2:LastUpdatedBy>FIN_IMPL</ns2:LastUpdatedBy>
                     <ns2:CreationDate>2022-09-01T12:09:05.023Z</ns2:CreationDate>
                     <ns2:CreatedBy>FIN_IMPL</ns2:CreatedBy>
                     <ns2:SiteUseCode>BILL_TO</ns2:SiteUseCode>
                     <ns2:PrimaryFlag>true</ns2:PrimaryFlag>
                     <ns2:Status>A</ns2:Status>
                     <ns2:Location>46242</ns2:Location>
                     <ns2:LastUpdateLogin>E7322B7916B97A00E0532560F00A7CB5</ns2:LastUpdateLogin>
                     <ns2:BillToSiteUseId xsi:nil="true"/>
                     <ns2:OrigSystemReference>300000262249865</ns2:OrigSystemReference>
                     <ns2:SICCode xsi:nil="true"/>
                     <ns2:PaymentTermId xsi:nil="true"/>
                     <ns2:GSAIndicator xsi:nil="true"/>
                     <ns2:TerritoryId xsi:nil="true"/>
                     <ns2:RequestId xsi:nil="true"/>
                     <ns2:TaxReference xsi:nil="true"/>
                     <ns2:SortPriority xsi:nil="true"/>
                     <ns2:TaxCode xsi:nil="true"/>
                     <ns2:SecondLastAccrueChargeDate xsi:nil="true"/>
                     <ns2:LastAccrueChargeDate xsi:nil="true"/>
                     <ns2:LastUnaccrueChargeDate xsi:nil="true"/>
                     <ns2:SecondLastUnaccrueChrgDate xsi:nil="true"/>
                     <ns2:TaxHeaderLevelFlag xsi:nil="true"/>
                     <ns2:FinchrgReceivablesTrxId xsi:nil="true"/>
                     <ns2:TaxRoundingRule xsi:nil="true"/>
                     <ns2:TaxClassification xsi:nil="true"/>
                     <ns2:CreatedByModule>HZ_WS</ns2:CreatedByModule>
                     <ns2:SetId>300000046981965</ns2:SetId>
                     <ns2:EndDate>4712-12-31</ns2:EndDate>
                     <ns2:StartDate>2022-09-01</ns2:StartDate>
                  </ns2:CustomerAccountSiteUse>
               </ns2:CustomerAccountSite>
            </ns2:Value>
         </ns0:result>
      </ns0:createCustomerAccountResponse>
   </env:Body>
</env:Envelope>

Customer Account and Account Site records get created through this SOAP service. Populate the correct SetId based on your configurations.

4. How to get the Set ID

Use the below SQL and cretae a BI data model to get the set id .

By running :

select *
from FND_SETID_SETS

you will get the list of your setID

if you have more than one language :

You can run

select ROWID              ROW_ID,
     SET_ID             SET_ID,
     SET_CODE           SET_CODE,
     SET_NAME           SET_NAME,
     DESCRIPTION        DESCRIPTION,
     CREATED_BY         CREATED_BY,
     CREATION_DATE      CREATION_DATE,
     LAST_UPDATED_BY    LAST_UPDATED_BY,
     LAST_UPDATE_DATE   LAST_UPDATE_DATE,
     LAST_UPDATE_LOGIN  LAST_UPDATE_LOGIN
from FND_SETID_SETS
where LANGUAGE = userenv('LANG')



 and run also below select to get setid assignments to Business Unit

select *
from FND_SETID_ASSIGNMENTS



You can also run below SQL to get the list of all your organizations

select *
from HR_ALL_ORGANIZATION_UNITS_F_VL'

5. Create Customer Profile

Create the customer profile to make the customer usable and set the attributes like credit history etc.

/fscmService/ReceivablesCustomerProfileService

From the response payload for customer creation , take CustomerAccountId and PartyId to be used as parameters to create a Customer Account Profile record.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/financials/receivables/customers/customerProfileService/types/" xmlns:cus="http://xmlns.oracle.com/apps/financials/receivables/customers/customerProfileService/" xmlns:cus1="http://xmlns.oracle.com/apps/financials/receivables/customerSetup/customerProfiles/model/flex/CustomerProfileDff/" xmlns:cus2="http://xmlns.oracle.com/apps/financials/receivables/customerSetup/customerProfiles/model/flex/CustomerProfileGdf/">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:createCustomerProfile>
       

         <typ:customerProfile>

            <!--Optional:-->

            <cus:AccountNumber>78901233121</cus:AccountNumber>

            <cus:CustomerAccountId>300000262249863</cus:CustomerAccountId>

            <cus:ProfileClassName>DEFAULT</cus:ProfileClassName>

            <cus:CreditChecking>Y</cus:CreditChecking>

            <cus:CreditHold>N</cus:CreditHold>

            <cus:DiscountTerms>Y</cus:DiscountTerms>

            <cus:DunningLetters>N</cus:DunningLetters>

            <cus:EffectiveEndDate>2030-01-10</cus:EffectiveEndDate>

            <cus:EffectiveStartDate>2022-09-01</cus:EffectiveStartDate>

            <cus:OverrideTerms>Y</cus:OverrideTerms>

            <cus:PartyId>300000262249842</cus:PartyId>

            <cus:CollectorName>Jim Jones</cus:CollectorName>

            <cus:AutoReceiptsIncludeDisputedItems>N</cus:AutoReceiptsIncludeDisputedItems>

            <cus:ConsolidatedInvoice>N</cus:ConsolidatedInvoice>

            <cus:CreditLimit>10000</cus:CreditLimit>

            <cus:CreditCurrencyCode>USD</cus:CreditCurrencyCode>

         </typ:customerProfile>

      </typ:createCustomerProfile>
   </soapenv:Body>
</soapenv:Envelope>

  

With this soap call Customer Account Profile gets created . Populate the correct AccountNumber field with a unique number for a new record. Populate the PartyId and CustomerAccountId from the REST response to PartyId and CustomerAccountId on the SOAP service payload.

Fusion Apps tech

wpsadmin
We will be happy to hear your thoughts

Leave a reply

Cloud Technologies Blog
Logo
Enable registration in settings - general
Compare items
  • Total (0)
Compare
0
Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock
Shopping cart