I am trying to find out the Right API to "*Assign Contact to Customer Account*". I found "hz_party_contact_v2pub.create_org_contact" can be used for assigning Org.Contact but not fiinding the one for Customer Contact.
I did try using "HZ_CUST_ACCOUNT_ROLE_V2PUB.create_cust_account_role" API to create 'CONTACT' role for the Customer account site but didn't help.
Really appreciate your response. Infact, i did use all those APIs you have mentioned except the last two (Assigning Phone No & Email). Stil i am not seeing my Contact displayed under Customer Account "Communication" Tab.
Here are the steps i have followed in detail
1. Created Party of Type Organization "Division1"
2. Created a Location
3. Created Party Site
4. Created party Site Use
5. Created Cust. Account for the "Divsion1"
6. created Cust.Site & USe
7. Created a party of Type PERSON "person"
8. Assigned this "Person" as ORG Contact to "Division1" (hz_party_contact_v2pub.create_org_contact)
9. Created Cust.Account Role of Type "Contact" for the Account created on Step 5 (HZ_CUST_ACCOUNT_ROLE_V2PUB.create_cust_account_role). I have passed party_id as person party id for this API.
When i see the "Communication" Tab (Where we generally see all Customer contacts), i am not seeing this contact there.
Yes i am initiializing apps using "MO_GLOBAL.SET_POLICY_CONTEXT ('S', 85);" (As we are on R12). And i am not passing ORG_ID to any of these APIs because we don't want to limit our customers to one Org. Infact, when i tried creating customer accounts using Front end it worked fine and ORG_ID is not populated for these as well.
Here is the Update. Finally i am able to see those contacts Under "Communication" tab for the Cust.Account. Earlier, i was passing both cust_account_id & cust_acct_site_id and because of this, the API was creating this contact @ Site level. When i stopped passing this Account Site id, it worked fine. Thanks for your time though.