SAP Knowledge Base Article - Public

3487618 - Creation of Parent Account - Child Account association before Parent Account - Root under Account Hierarchy via Postman

Symptom

Creation of Parent Account - Child Account association before Parent Account - Root under Account Hierarchy via Postman

Environment

SAP Sales Cloud and SAP Service Cloud Version 2

Reproducing the Issue

  1. Go to Navigation Menu and open Account Hierarchy 
  2. Click on + button
  3. Enter the Account Name and Usage Type
  4. Save and Open
  5. Click on + (Add Child Account) button
  6. Enter the Account name and save
  7. Here we can see that you can only create a Parent Account - Child Account relationship after creating the Parent Account - Root association
  8. Open Postman
  9. Select POST method and enter https://tenanturl/sap/c4c/api/v1/account-hierarchy-service/accountHierarchies 
  10. Under Authorisation facet, enter your credentials associated to your tenant under Basic Auth
  11. In Body, provide the payload for account id and parent account id. An example of this would be:
    {
        "account": {
            "accountId": "accountuuid"
        
        },
        "parentAccount": {
            "accountId": "parentaccountuuid"
        }
    }     
  12. Click send
  13. You notice that the parent account - child account association is created first before parent account - root node association

Cause

Account Hierarchy in CNS supports replication. When the data is coming from an external system, the order of the Accounts Hierarchies cannot be guarantied. So, to handle this use case, we allow the child hierarchy to be created before the parent hierarchy is created. 

This scenario is not applicable to the UI as its created manually and the order can be followed. 

Resolution

This is expected system design.

Keywords

account hierarchy, parent, child, association, root, sequence, postman , KBA , CEC-CRM-ACH , Account Hierarchy , Problem

Product

SAP Sales Cloud and SAP Service Cloud Version 2 1.0