Angelo Santagata's Blog

Adding a contact to a sales cloud account

Angelo Santagata

A common question is how do you add a contact to a Account in Sales Cloud? Ive seen developers (including me) try to issue a mergeOrganizaiton on the org, however this is not correct. In Oracle Fusion , Contacts are not "addded" to accounts but they are "related" to accounts.. Therefore to add a contact to a account you need to add a "Relationship" which links the contact and the organization. Here's a sample payload


SOAP Request Payload

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/crmCommon/salesParties/relationshipService/types/" xmlns:rel="http://xmlns.oracle.com/apps/crmCommon/salesParties/relationshipService/">





<!-- ContactId -->


<!-- AccountId -->










Groovy Script Example

def addContact =


        ObjectPartyId        : '300000000943126', /*Contact */

        SubjectPartyId       : '300000000943078', /*Account */

        RelationshipType  : 'CONTACT',

        RelationshipCode  : 'CONTACT',

        CreatedByModule : 'HZ_WS',

        Status  : 'A'



Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.