Set ParentAccount When Creating Or Updating Account With REST API (Doc ID 2257815.1)

Last updated on JULY 28, 2017

Applies to:

Oracle Fusion Sales - Version 11.12.1.0.0 and later
Information in this document applies to any platform.

Symptoms

On : 11.12.1.0.0 version, Accounts, Contacts, Households

ACTUAL BEHAVIOR
---------------
Set ParentAccount when creating or updating account with REST API, Oracle Sales Cloud

Requirement: I want to create an account using the REST Web Service and at the same time relate a Parent Account to this account. I'm using a REST Client (Advanced Rest Client). This question is related to the REST API and how I must design the Request Payload in the POST / PUT -call in order to set the Parent Account.

Using the following payload:

{
"OrganizationName": "New Account",
"Type": "ZCA_CUSTOMER",
"ParentAccountPartyId": XXXXXXXXXXXXXXXX,
"ParentAccountPartyNumber": "XXXXXXX",
"ParentAccountSourceSystem": null,
"ParentAccountSourceSystemReferenceValue": null,
"ParentAccountName": "XXXXXXXXX International"
}

Gives me status code error message:
Attribute ParentAccountName in view object Account cannot be set.

Trying to remove this, and only having the other values, i.e.:

{
"OrganizationName": "New Account",
"Type": "ZCA_CUSTOMER",
"ParentAccountPartyId": XXXXXXXXX,
"ParentAccountPartyNumber": "XXXXX"
}

will give me a response where these values are set, but it is not sustained, and the the parent account field is empty when opening the newly created account in sales cloud.

Following your documentation in http://docs.oracle.com/cloud/latest/salescs_gs/FAAPS/op-crmCommonApi-resources-11.12.1.0-accounts-post.html

it says the following under Body Parameter -> Root Schema : accounts-item:
ParentAccountPartyId
Type: integer (int64)
Title: Parent Account Id
The party Id of the parent account within the hierarchy. To assign a parent account to a sales account, you must provide the parent account's party ID, party number, or source system reference.

However, this does not seem to be the case.

Please help me figure out how the payload should look in order to create a new account that also has a linked parent account, given that all the parent account information is available (partyId, PartyNumber, name etc.)


EXPECTED BEHAVIOR
-----------------------
Account should get created with Parent Account.

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Use any REST Client to Create an account.
2. Pass the ParentAccountPartyId or ParentAccountPartyNumber in the payload.
3. The account will be created with ParentAccount details.
4. Open Accounts in SUI.
5. Parent Account field does not have any data.

BUSINESS IMPACT
-----------------------
The issue has the following business impact:
Due to this issue, users cannot associate a parent account with Account using REST.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms