SlideShare a Scribd company logo
Customer Account Creation Flow
Sample Flow:
1. Customer Account: Model Artworks Asia
•Organization Party: Model Artworks
•Organization Profile
•Account Profile and Profile Amounts
2. Location: 1 Robinson Road, Singapore 601010
3. Organization Address: Model Artworks – 1 Robinson Road
4. Customer Account Site: Model Artworks Asia – 1 Robinson Road
5. Customer Account Site Use: Model Artworks Asia – 1 Robinson Road – BILL TO
•Party Site Use: Model Artworks – 1 Robinson Road – BILL TO
•Account Site Profile and Profile Amounts
6. Person: Ash Lee
7. Organization Contact: Ash Lee – Model Artworks
8. Location: 2 Robinson Road, Singapore 601020.
9. Organization Contact - Address: Ash Lee – Model Artworks – 2 Robinson Road
10. Organization Contact - Contact Point: Ash Lee – Model Artworks – Phone 65-7771212
11. Customer Account Role: Model Artworks Asia - Ash Lee – Model Artworks – CONTACT
12. Customer Account Role Responsibility: - Ash Lee – Model Artworks – CONTACT – Bill to
1. Create Account / Organization / Organization Profile / Account Profile /
Account Profile Amount
API:HZ_CUST_ACCOUNT_V2PUB.create_cust_account
Record type variables:
p_cust_account_recHZ_CUST_ACCOUNT_V2PUB.CUST_ACCOUNT_REC_TYPE;
p_organization_recHZ_PARTY_V2PUB.ORGANIZATION_REC_TYPE;
p_customer_profile_recHZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE;
Output variables:
x_cust_account_id NUMBER;
x_account_number VARCHAR2(2000);
x_party_id NUMBER;
x_party_number VARCHAR2(2000);
x_profile_id NUMBER;
Values to pass to API:
p_cust_account_rec.account_name := 'Model Artworks Asia';
p_cust_account_rec.created_by_module := 'TCA_V2_API';
p_organization_rec.organization_name := 'Model Artworks';
p_organization_rec.created_by_module := 'TCA_V2_API';
Output:
x_cust_account_id: 252705
x_account_number: 7660
x_party_id: 488974
x_party_number: 55446
x_profile_id: 415422
Query Data:
select cust_account_id, party_id, account_number, account_name
from hz_cust_accounts
where cust_account_id = 252705;
CUST_ACCOUNT_ID PARTY_ID ACCOUNT_NUMBER ACCOUNT_NAME
252705 488974 7660 Model Artworks Asia
select party_id, party_number, party_type, party_name
from hz_parties
where party_id = 488974;
PARTY_ID PARTY_NUMBER PARTY_TYPE PARTY_NAME
488974 55446 ORGANIZATION Model Artworks
select organization_profile_id,party_id
from hz_organization_profiles
where organization_profile_id = 414426;
ORGANIZATION_PROFILE_ID PARTY_ID
415422 488974
select cust_account_profile_id, cust_account_id, party_id,
profile_class_id, site_use_id
from hz_customer_profiles
where cust_account_id = 252705;
CUST_ACCOUNT_PROFILE_ID CUST_ACCOUNT_ID PARTY_ID
PROFILE_CLASS_ID SITE_USE_ID
244818 252705 488974 0
select cust_acct_profile_amt_id, cust_account_profile_id,
cust_account_id, site_use_id, currency_code
from hz_cust_profile_amts
where cust_account_profile_id = 244818;
CUST_ACCT_ CUST_ACCOUNT_
PROFILE_AMT_ID PROFILE_ID CUST_ACCOUNT_ID SITE_USE_ID
CURRENCY_CODE
241143 244818 252705 CAD
241144 244818 252705 EUR
241145 244818 252705 GBP
241146 244818 252705 RUR
241147 244818 252705 SEK
241148 244818 252705 USD
Navigation:
Receivables> Customers> Query Name = Model Artworks
Receivables> Customers> Accounts> Account – Model Artworks Asia [Details] >
Account Profile
Receivables> Customers> Accounts> Account – Model Artworks Asia [Details] > Profile
Amounts
For Party and Organization Profile:
Oracle Customers Online> Customers> Organizations> Query Name = Model
Artworks> Click on Name link> Profile
2. Create Location for Organization Address
API:HZ_LOCATION_V2PUB.create_location
Record type variables:
p_location_rec HZ_LOCATION_V2PUB.LOCATION_REC_TYPE;
Output variables:
x_location_id NUMBER;
Values to pass to API:
p_location_rec.country := 'SG';
p_location_rec.address1 := '1 Robinson Road';
p_location_rec.city := 'Singapore';
p_location_rec.postal_code := '601010';
p_location_rec.created_by_module := 'TCA_V2_API';
Output:
x_location_id: 28964
Query Data:
select location_id,address1,city,postal_code
from hz_locations
where location_id = 28964;
LOCATION_ID ADDRESS1 CITY POSTAL_CODE
28964 1 Robinson Road Singapore 601010
3. Organization Address - Create Party Site
API:HZ_PARTY_SITE_V2PUB.create_party_site
Record type variables:
p_party_site_rec HZ_PARTY_SITE_V2PUB.PARTY_SITE_REC_TYPE;
Output variables:
x_party_site_id NUMBER;
x_party_site_number VARCHAR2(2000);
Values to pass to API:
p_party_site_rec.party_id := 488974; -- value of party_id from step 1
p_party_site_rec.location_id := 28964; -- value of location_id from step 2
p_party_site_rec.identifying_address_flag := 'Y';
p_party_site_rec.created_by_module := 'TCA_V2_API';
Output:
x_party_site_id: 357430
x_party_site_number: 26165
Query Data:
select party_site_id, party_id, location_id, party_site_number
from Hz_party_sites
where party_site_id = 357430;
PARTY_SITE_ID PARTY_ID LOCATION_ID PARTY_SITE_NUMBER
357430 488974 28964 26165
Navigation:
Oracle Customers Online> Customers> Organizations> Query Name = Model
Artworks> Click on Name link> Addresses
4. Create Customer Account Site
API:HZ_CUST_ACCOUNT_SITE_V2PUB.create_cust_acct_site
Record type variables:
p_cust_acct_site_rec hz_cust_account_site_v2pub.cust_acct_site_rec_type;
Output variables:
x_cust_acct_site_id NUMBER;
Values to pass to API:
p_cust_acct_site_rec.cust_account_id := 252705; -- value of cust_account_id from
step 1
p_cust_acct_site_rec.party_site_id := 357430; -- value of party_site_id from step 3
p_cust_acct_site_rec.created_by_module := 'TCA_V2_API';
Output:
x_cust_acct_site_id: 13903
Query Data:
select cust_acct_site_id, cust_account_id, party_site_id, org_id
from hz_cust_acct_sites_all
where cust_acct_site_id = 13903;
CUST_ACCT_SITE_ID CUST_ACCOUNT_ID PARTY_SITE_ID ORG_ID
13903 252705 357430 204
Navigation:
Receivables> Customers> Accounts> Account – Model Artworks Asia [Details]>
Account> Sites
5. Create Account Site Use / Party Site Use / Account Site Profile / Account
Site Profile Amounts
API:HZ_CUST_ACCOUNT_SITE_V2PUB.create_cust_site_use
Record type variables:
p_cust_site_use_rec HZ_CUST_ACCOUNT_SITE_V2PUB.CUST_SITE_USE_REC_TYPE;
p_customer_profile_rec
HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE;
Output variables:
x_site_use_id NUMBER;
Values to pass to API:
p_cust_site_use_rec.cust_acct_site_id := 13903; -- value of cust_acct_site_id from
step 4
p_cust_site_use_rec.site_use_code := 'BILL_TO';
p_cust_site_use_rec.created_by_module := 'TCA_V2_API';
select hz_cust_site_uses_s.nextval into p_location from dual;
p_cust_site_use_rec.location := p_location;
Output:
x_site_use_id: 16390
Query Data:
select site_use_id, cust_acct_site_id, site_use_code, location,
org_id
from hz_cust_site_uses_all
where site_use_id = 16390;
SITE_USE_ID CUST_ACCT_SITE_ID SITE_USE_CODE LOCATION ORG_ID
16390 13903 BILL_TO 16389 204
Party Site Use:
select party_site_use_id, party_site_id, site_use_type,
primary_per_type
from hz_party_site_uses
where party_site_id = 357430;
PARTY_SITE_USE_ID PARTY_SITE_ID SITE_USE_TYPE PRIMARY_PER_TYPE
322876 357430 BILL_TO Y
Account Site Use Profile:
select cust_account_profile_id, cust_account_id, party_id,
profile_class_id, site_use_id
from hz_customer_profiles
where cust_account_id = 252705;
CUST_ACCOUNT_PROFILE_ID CUST_ACCOUNT_ID PARTY_ID
PROFILE_CLASS_ID SITE_USE_ID
244818 252705 488974 0
245819 252705 488974 0 16390
Account Site Use Profile Amounts:
select cust_acct_profile_amt_id, cust_account_profile_id,
cust_account_id, site_use_id, currency_code
from hz_cust_profile_amts
where cust_account_profile_id = 245819;
CUST_ CUST_
ACCT_PROFILE_AMT_ID ACCOUNT_PROFILE_ID CUST_ACCOUNT_ID
SITE_USE_ID CURRENCY_CODE
242143 245819 252705 16390 CAD
242144 245819 252705 16390 EUR
242145 245819 252705 16390 GBP
242146 245819 252705 16390 RUR
242147 245819 252705 16390 SEK
242148 245819 252705 16390 USD
Navigation:
Receivables> Customers> Accounts> Account – Model Artworks Asia [Details]> Sites>
Account Sites [Details] – Business Purposes
Receivables> Customers> Accounts> Account – Model Artworks Asia [Details]> Sites
[Details] – Profile
Receivables> Customers> Accounts> Account – Model Artworks Asia [Details]> Sites
[Details] – Profile Amounts
Party Site Use:
Oracle Customers Online> Customers> Organizations> Query Name = Model
Artworks> Click on Name link> Addresses - Purpose
6. Create Person
API: HZ_PARTY_V2PUB.create_person
Record type variables:
p_person_rec HZ_PARTY_V2PUB.PERSON_REC_TYPE;
Output variables:
x_party_id NUMBER;
x_party_number VARCHAR2(2000);
x_profile_id NUMBER;
Values to pass to API:
p_person_rec.person_first_name := 'Ash';
p_person_rec.person_last_name := 'Lee';
p_person_rec.created_by_module := 'TCA_V2_API';
Output:
x_party_id = 490974
Query Data:
Select party_id, party_name
From hz_parties
Where party_id = 490974;
PARTY_ID PARTY_NAME
490974 Ash Lee
Navigation:
Oracle Customers Online> Customers> Persons> Query Name = Ash Lee
7. Create Organization Contact (Link Person to Organization)
API:HZ_PARTY_CONTACT_V2PUB.create_org_contact
Record type variables:
p_org_contact_rec HZ_PARTY_CONTACT_V2PUB.org_contact_rec_type;
Output variables:
x_corg_contact_id NUMBER;
x_cparty_rel_id NUMBER;
x_cparty_id NUMBER;
x_cparty_number VARCHAR2(2000);
Values to pass to API:
p_org_contact_rec.created_by_module := 'TCA_V2_API';
p_org_contact_rec.party_rel_rec.subject_id:= 490974; -- value of party_id from step 6
p_org_contact_rec.party_rel_rec.subject_type :='PERSON';
p_org_contact_rec.party_rel_rec.subject_table_name:='HZ_PARTIES';
p_org_contact_rec.party_rel_rec.object_id:= 488974; -- value of party_id from step 1
p_org_contact_rec.party_rel_rec.object_type:='ORGANIZATION';
p_org_contact_rec.party_rel_rec.object_table_name:='HZ_PARTIES';
p_org_contact_rec.party_rel_rec.relationship_type:='CONTACT';
p_org_contact_rec.party_rel_rec.relationship_code:='CONTACT_OF';
p_org_contact_rec.party_rel_rec.status := 'A';
--For Organization Address level contact, assign following value:
--p_org_contact_rec.party_site_id:=357430; -- value of party_site_id from step 3
Output:
x_org_contact_id = 186069
x_party_rel_id = 643026
x_party_id = 490975
x_party_number = 55488
Query Data:
select org_contact_id, party_relationship_id
from hz_org_contacts
where org_contact_id = 186069;
ORG_CONTACT_ID PARTY_RELATIONSHIP_ID
-------------- ---------------------
186069 643026
Relationship:
select relationship_id, subject_id, subject_type,
subject_table_name,
object_id, object_type, object_table_name, directional_flag
relationship_type, relationship_code, party_id
from hz_relationships
where relationship_id = 643026;
RELATIONSHIP_ID SUBJECT_ID SUBJECT_TYPE SUBJECT_TABLE_NAME
OBJECT_ID OBJECT_TYPE OBJECT_TABLE_NAME DIRECTIONAL_FLAG
RELATIONSHIP_TYPE RELATIONSHIP_CODE PARTY_ID
643026 488974 ORGANIZATION HZ_PARTIES 490974 PERSON HZ_PARTIES B
CONTACT 490975
643026 490974 PERSON HZ_PARTIES 488974 ORGANIZATION HZ_PARTIES F
CONTACT_OF 490975
Relationship party:
select party_id, party_number, party_type, party_name
from hz_parties
where party_id = 490975;
PARTY_ID PARTY_NUMBER PARTY_TYPE PARTY_NAME
490975 55488 PARTY_RELATIONSHIP Ash Lee-Model Artworks-
55488
Navigation:
Oracle Customers Online> Customers> Organizations> Query Name = Model
Artworks> Click on Name link> Relationships> Contacts
8. Organization Contact Address – Create Location
API:HZ_LOCATION_V2PUB.create_location
Record type variables:
p_location_rec HZ_LOCATION_V2PUB.LOCATION_REC_TYPE;
Output variables:
x_location_id NUMBER;
Values to pass to API:
p_location_rec.country := 'SG';
p_location_rec.address1 := '2 Robinson Road';
p_location_rec.city := 'Singapore';
p_location_rec.postal_code := '601020';
p_location_rec.created_by_module := 'TCA_V2_API';
Output:
x_location_id: 28985
Query Data:
select location_id,address1,city,postal_code
from hz_locations
where location_id = 28985;
LOCATION_ID ADDRESS1 CITY POSTAL_CODE
28985 2 Robinson Road Singapore 601020
9. Organization Contact Address - Create Party Site
API:HZ_PARTY_SITE_V2PUB.create_party_site
Record type variables:
p_party_site_rec HZ_PARTY_SITE_V2PUB.PARTY_SITE_REC_TYPE;
Output variables:
x_party_site_id NUMBER;
x_party_site_number VARCHAR2(2000);
Values to pass to API:
p_party_site_rec.party_id := 490975; -- value of party_id from step 7
p_party_site_rec.location_id := 28985; -- value of location_id from step 8
p_party_site_rec.identifying_address_flag := 'Y';
p_party_site_rec.created_by_module := 'TCA_V2_API';
Output:
x_party_site_id: 358431
x_party_site_number: 26185
Query Data:
select party_site_id, party_id, location_id, party_site_number
from Hz_party_sites
where party_site_id = 358431;
PARTY_SITE_ID PARTY_ID LOCATION_ID PARTY_SITE_NUMBER
358431 488975 28985 26185
Navigation:
Oracle Customers Online> Customers> Organizations> Query Name = Model
Artworks> Click on Name link> Relationships> Contacts – Address
10. Organization Contact - Create Contact Point – Phone number
API:HZ_CONTACT_POINT_V2PUB.create_contact_point
Record type variables:
p_contact_point_rec HZ_CONTACT_POINT_V2PUB.CONTACT_POINT_REC_TYPE;
Output variables:
p_edi_rec HZ_CONTACT_POINT_V2PUB.EDI_REC_TYPE;
p_email_rec HZ_CONTACT_POINT_V2PUB.EMAIL_REC_TYPE;
p_phone_rec HZ_CONTACT_POINT_V2PUB.PHONE_REC_TYPE;
p_telex_rec HZ_CONTACT_POINT_V2PUB.TELEX_REC_TYPE;
p_web_rec HZ_CONTACT_POINT_V2PUB.WEB_REC_TYPE;
x_contact_point_id NUMBER;
Values to pass to API:
p_contact_point_rec.contact_point_type := 'PHONE';
p_contact_point_rec.owner_table_name := 'HZ_PARTIES';
p_contact_point_rec.owner_table_id := '490975'; -- value of party_id from step 7
p_contact_point_rec.primary_flag := 'Y';
p_contact_point_rec.contact_point_purpose := 'BUSINESS';
p_phone_rec.phone_country_code := '65';
p_phone_rec.phone_number := '6777-1212';
p_phone_rec.phone_line_type := 'GEN';
p_contact_point_rec.created_by_module := 'TCA_V2_API';
Output:
x_contact_point_id: 350447
Query Data:
select contact_point_id, contact_point_type, owner_table_name,
owner_table_id, primary_flag, phone_country_code, phone number
from hz_contact_points
where contact_point_id = 350447;
CONTACT_ CONTACT_ OWNER_ OWNER_ PRIMARY PHONE_ PHONE_
POINT_ID POINT_TYPE TABLE_NAME TABLE_ID _FLAG COUNTRY_ NUMBER
CODE
350447 PHONE HZ_PARTIES 490975 Y 65 6777-1212
Navigation:
Oracle Customers Online> Customers> Organizations> Query Name = Model
Artworks> Click on Name link> Relationships> Contacts – Phone
11. Create Customer Account Role (Link Organization Contact to Customer
Account)
API:HZ_CUST_ACCOUNT_ROLE_V2PUB.create_cust_account_role
Record type variables:
p_cust_account_role_recHZ_CUST_ACCOUNT_ROLE_V2PUB.CUST_ACCOUNT_ROLE_REC_TYPE;
Output variables:
x_cust_account_role_id NUMBER;
Values to pass to API:
p_cust_account_role_rec.created_by_module := 'TCA_V2_API';
p_cust_account_role_rec.party_id := 490975; -- value of party_id from step 7
p_cust_account_role_rec.cust_account_id := 252705; -- value of cust_account_id from step 1
p_cust_account_role_rec.role_type := 'CONTACT';
p_cust_account_role_rec.status := 'A';
-- Note: If contact is at site level, assign value to cust_acct_site_id
--p_cust_account_role_rec.cust_acct_site_id := 13903;
Output:
x_cust_account_role_id=81851
Query Data:
select cust_account_role_id, party_id, cust_account_id,
cust_acct_site_id, role_type
from hz_cust_account_roles
where cust_account_role_id = 81851;
CUST_ACCOUNT_ROLE_ID PARTY_ID CUST_ACCOUNT_ID CUST_ACCT_SITE_ID
ROLE_TYPE
81851 490975 252705
CONTACT
Navigation:
Receivables> Customers> Account – Model Artworks Asia [Details]> Communication>
Account Contacts
Receivables> Customers> Account – Model Artworks Asia [Details]> Communication>
Account Contacts [Details]
12. Create Customer Account Role Responsibility
API:HZ_CUST_ACCOUNT_ROLE_V2PUB.create_role_responsibility
Record type variables:
p_role_responsibility_rec
HZ_CUST_ACCOUNT_ROLE_V2PUB.role_responsibility_rec_TYPE;
Output variables:
x_responsibility_id NUMBER;
Values to pass to API:
p_role_responsibility_rec.created_by_module := 'TCA_V2_API';
p_role_responsibility_rec.cust_account_role_id:=81851; -- value of
cust_account_role_id from step 11
p_role_responsibility_rec.primary_flag:='Y';
p_role_responsibility_rec.responsibility_type:='BILL_TO';
Output:
x_responsibility_id=34406
Query Data:
select
responsibility_id,cust_account_role_id,responsibility_type,prima
ry_flag
from hz_role_responsibility
where responsibility_id = 34406;
RESPONSIBILITY_ID CUST_ACCOUNT_ROLE_ID RESPONSIBILITY_TYPE
PRIMARY_FLAG
34406 81851 BILL_TO
Y
Navigation:
Receivables> Customers> Account – Model Artworks Asia [Details]> Communication>
Account Contacts [Details] > Contact Roles

More Related Content

ODT
Examples of-tca-apis
DOCX
List of api in tca
TXT
Create cust acct api
DOC
Oracle Application Technical - Hz architecture
PPTX
Tca presentation
TXT
Api error handling
PPT
Les06 oracle business_intelligence_obiee
DOCX
P2P table
Examples of-tca-apis
List of api in tca
Create cust acct api
Oracle Application Technical - Hz architecture
Tca presentation
Api error handling
Les06 oracle business_intelligence_obiee
P2P table

Recently uploaded (20)

PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
Introduction to Building Materials
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
PDF
Hazard Identification & Risk Assessment .pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Trump Administration's workforce development strategy
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
Computing-Curriculum for Schools in Ghana
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Supply Chain Operations Speaking Notes -ICLT Program
A systematic review of self-coping strategies used by university students to ...
Introduction to Building Materials
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Chinmaya Tiranga quiz Grand Finale.pdf
Practical Manual AGRO-233 Principles and Practices of Natural Farming
Hazard Identification & Risk Assessment .pdf
Final Presentation General Medicine 03-08-2024.pptx
Trump Administration's workforce development strategy
Final Presentation General Medicine 03-08-2024.pptx
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
UNIT III MENTAL HEALTH NURSING ASSESSMENT
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
LDMMIA Reiki Yoga Finals Review Spring Summer
Computing-Curriculum for Schools in Ghana
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Ad
Ad

Customer account creation API & query

  • 1. Customer Account Creation Flow Sample Flow: 1. Customer Account: Model Artworks Asia •Organization Party: Model Artworks •Organization Profile •Account Profile and Profile Amounts 2. Location: 1 Robinson Road, Singapore 601010 3. Organization Address: Model Artworks – 1 Robinson Road 4. Customer Account Site: Model Artworks Asia – 1 Robinson Road 5. Customer Account Site Use: Model Artworks Asia – 1 Robinson Road – BILL TO •Party Site Use: Model Artworks – 1 Robinson Road – BILL TO •Account Site Profile and Profile Amounts 6. Person: Ash Lee 7. Organization Contact: Ash Lee – Model Artworks 8. Location: 2 Robinson Road, Singapore 601020. 9. Organization Contact - Address: Ash Lee – Model Artworks – 2 Robinson Road 10. Organization Contact - Contact Point: Ash Lee – Model Artworks – Phone 65-7771212 11. Customer Account Role: Model Artworks Asia - Ash Lee – Model Artworks – CONTACT 12. Customer Account Role Responsibility: - Ash Lee – Model Artworks – CONTACT – Bill to 1. Create Account / Organization / Organization Profile / Account Profile / Account Profile Amount API:HZ_CUST_ACCOUNT_V2PUB.create_cust_account Record type variables: p_cust_account_recHZ_CUST_ACCOUNT_V2PUB.CUST_ACCOUNT_REC_TYPE; p_organization_recHZ_PARTY_V2PUB.ORGANIZATION_REC_TYPE; p_customer_profile_recHZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE; Output variables: x_cust_account_id NUMBER; x_account_number VARCHAR2(2000); x_party_id NUMBER; x_party_number VARCHAR2(2000); x_profile_id NUMBER; Values to pass to API: p_cust_account_rec.account_name := 'Model Artworks Asia'; p_cust_account_rec.created_by_module := 'TCA_V2_API'; p_organization_rec.organization_name := 'Model Artworks'; p_organization_rec.created_by_module := 'TCA_V2_API';
  • 2. Output: x_cust_account_id: 252705 x_account_number: 7660 x_party_id: 488974 x_party_number: 55446 x_profile_id: 415422 Query Data: select cust_account_id, party_id, account_number, account_name from hz_cust_accounts where cust_account_id = 252705; CUST_ACCOUNT_ID PARTY_ID ACCOUNT_NUMBER ACCOUNT_NAME 252705 488974 7660 Model Artworks Asia select party_id, party_number, party_type, party_name from hz_parties where party_id = 488974; PARTY_ID PARTY_NUMBER PARTY_TYPE PARTY_NAME 488974 55446 ORGANIZATION Model Artworks select organization_profile_id,party_id from hz_organization_profiles where organization_profile_id = 414426; ORGANIZATION_PROFILE_ID PARTY_ID 415422 488974 select cust_account_profile_id, cust_account_id, party_id, profile_class_id, site_use_id from hz_customer_profiles where cust_account_id = 252705; CUST_ACCOUNT_PROFILE_ID CUST_ACCOUNT_ID PARTY_ID PROFILE_CLASS_ID SITE_USE_ID 244818 252705 488974 0 select cust_acct_profile_amt_id, cust_account_profile_id, cust_account_id, site_use_id, currency_code from hz_cust_profile_amts where cust_account_profile_id = 244818; CUST_ACCT_ CUST_ACCOUNT_ PROFILE_AMT_ID PROFILE_ID CUST_ACCOUNT_ID SITE_USE_ID CURRENCY_CODE 241143 244818 252705 CAD
  • 3. 241144 244818 252705 EUR 241145 244818 252705 GBP 241146 244818 252705 RUR 241147 244818 252705 SEK 241148 244818 252705 USD Navigation: Receivables> Customers> Query Name = Model Artworks Receivables> Customers> Accounts> Account – Model Artworks Asia [Details] > Account Profile
  • 4. Receivables> Customers> Accounts> Account – Model Artworks Asia [Details] > Profile Amounts
  • 5. For Party and Organization Profile: Oracle Customers Online> Customers> Organizations> Query Name = Model Artworks> Click on Name link> Profile
  • 6. 2. Create Location for Organization Address API:HZ_LOCATION_V2PUB.create_location Record type variables: p_location_rec HZ_LOCATION_V2PUB.LOCATION_REC_TYPE; Output variables: x_location_id NUMBER; Values to pass to API: p_location_rec.country := 'SG'; p_location_rec.address1 := '1 Robinson Road'; p_location_rec.city := 'Singapore'; p_location_rec.postal_code := '601010'; p_location_rec.created_by_module := 'TCA_V2_API'; Output: x_location_id: 28964 Query Data: select location_id,address1,city,postal_code from hz_locations where location_id = 28964;
  • 7. LOCATION_ID ADDRESS1 CITY POSTAL_CODE 28964 1 Robinson Road Singapore 601010 3. Organization Address - Create Party Site API:HZ_PARTY_SITE_V2PUB.create_party_site Record type variables: p_party_site_rec HZ_PARTY_SITE_V2PUB.PARTY_SITE_REC_TYPE; Output variables: x_party_site_id NUMBER; x_party_site_number VARCHAR2(2000); Values to pass to API: p_party_site_rec.party_id := 488974; -- value of party_id from step 1 p_party_site_rec.location_id := 28964; -- value of location_id from step 2 p_party_site_rec.identifying_address_flag := 'Y'; p_party_site_rec.created_by_module := 'TCA_V2_API'; Output: x_party_site_id: 357430 x_party_site_number: 26165 Query Data: select party_site_id, party_id, location_id, party_site_number from Hz_party_sites where party_site_id = 357430; PARTY_SITE_ID PARTY_ID LOCATION_ID PARTY_SITE_NUMBER 357430 488974 28964 26165 Navigation: Oracle Customers Online> Customers> Organizations> Query Name = Model Artworks> Click on Name link> Addresses
  • 8. 4. Create Customer Account Site API:HZ_CUST_ACCOUNT_SITE_V2PUB.create_cust_acct_site Record type variables: p_cust_acct_site_rec hz_cust_account_site_v2pub.cust_acct_site_rec_type; Output variables: x_cust_acct_site_id NUMBER; Values to pass to API: p_cust_acct_site_rec.cust_account_id := 252705; -- value of cust_account_id from step 1 p_cust_acct_site_rec.party_site_id := 357430; -- value of party_site_id from step 3 p_cust_acct_site_rec.created_by_module := 'TCA_V2_API'; Output: x_cust_acct_site_id: 13903 Query Data: select cust_acct_site_id, cust_account_id, party_site_id, org_id from hz_cust_acct_sites_all where cust_acct_site_id = 13903; CUST_ACCT_SITE_ID CUST_ACCOUNT_ID PARTY_SITE_ID ORG_ID 13903 252705 357430 204 Navigation: Receivables> Customers> Accounts> Account – Model Artworks Asia [Details]> Account> Sites
  • 9. 5. Create Account Site Use / Party Site Use / Account Site Profile / Account Site Profile Amounts API:HZ_CUST_ACCOUNT_SITE_V2PUB.create_cust_site_use Record type variables: p_cust_site_use_rec HZ_CUST_ACCOUNT_SITE_V2PUB.CUST_SITE_USE_REC_TYPE; p_customer_profile_rec HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE; Output variables: x_site_use_id NUMBER; Values to pass to API: p_cust_site_use_rec.cust_acct_site_id := 13903; -- value of cust_acct_site_id from step 4 p_cust_site_use_rec.site_use_code := 'BILL_TO'; p_cust_site_use_rec.created_by_module := 'TCA_V2_API'; select hz_cust_site_uses_s.nextval into p_location from dual; p_cust_site_use_rec.location := p_location; Output: x_site_use_id: 16390
  • 10. Query Data: select site_use_id, cust_acct_site_id, site_use_code, location, org_id from hz_cust_site_uses_all where site_use_id = 16390; SITE_USE_ID CUST_ACCT_SITE_ID SITE_USE_CODE LOCATION ORG_ID 16390 13903 BILL_TO 16389 204 Party Site Use: select party_site_use_id, party_site_id, site_use_type, primary_per_type from hz_party_site_uses where party_site_id = 357430; PARTY_SITE_USE_ID PARTY_SITE_ID SITE_USE_TYPE PRIMARY_PER_TYPE 322876 357430 BILL_TO Y Account Site Use Profile: select cust_account_profile_id, cust_account_id, party_id, profile_class_id, site_use_id from hz_customer_profiles where cust_account_id = 252705; CUST_ACCOUNT_PROFILE_ID CUST_ACCOUNT_ID PARTY_ID PROFILE_CLASS_ID SITE_USE_ID 244818 252705 488974 0 245819 252705 488974 0 16390 Account Site Use Profile Amounts: select cust_acct_profile_amt_id, cust_account_profile_id, cust_account_id, site_use_id, currency_code from hz_cust_profile_amts where cust_account_profile_id = 245819; CUST_ CUST_ ACCT_PROFILE_AMT_ID ACCOUNT_PROFILE_ID CUST_ACCOUNT_ID SITE_USE_ID CURRENCY_CODE 242143 245819 252705 16390 CAD 242144 245819 252705 16390 EUR 242145 245819 252705 16390 GBP 242146 245819 252705 16390 RUR 242147 245819 252705 16390 SEK
  • 11. 242148 245819 252705 16390 USD Navigation: Receivables> Customers> Accounts> Account – Model Artworks Asia [Details]> Sites> Account Sites [Details] – Business Purposes Receivables> Customers> Accounts> Account – Model Artworks Asia [Details]> Sites [Details] – Profile Receivables> Customers> Accounts> Account – Model Artworks Asia [Details]> Sites [Details] – Profile Amounts
  • 12. Party Site Use: Oracle Customers Online> Customers> Organizations> Query Name = Model Artworks> Click on Name link> Addresses - Purpose 6. Create Person API: HZ_PARTY_V2PUB.create_person
  • 13. Record type variables: p_person_rec HZ_PARTY_V2PUB.PERSON_REC_TYPE; Output variables: x_party_id NUMBER; x_party_number VARCHAR2(2000); x_profile_id NUMBER; Values to pass to API: p_person_rec.person_first_name := 'Ash'; p_person_rec.person_last_name := 'Lee'; p_person_rec.created_by_module := 'TCA_V2_API'; Output: x_party_id = 490974 Query Data: Select party_id, party_name From hz_parties Where party_id = 490974; PARTY_ID PARTY_NAME 490974 Ash Lee Navigation: Oracle Customers Online> Customers> Persons> Query Name = Ash Lee
  • 14. 7. Create Organization Contact (Link Person to Organization) API:HZ_PARTY_CONTACT_V2PUB.create_org_contact Record type variables: p_org_contact_rec HZ_PARTY_CONTACT_V2PUB.org_contact_rec_type; Output variables: x_corg_contact_id NUMBER; x_cparty_rel_id NUMBER; x_cparty_id NUMBER; x_cparty_number VARCHAR2(2000); Values to pass to API: p_org_contact_rec.created_by_module := 'TCA_V2_API'; p_org_contact_rec.party_rel_rec.subject_id:= 490974; -- value of party_id from step 6 p_org_contact_rec.party_rel_rec.subject_type :='PERSON'; p_org_contact_rec.party_rel_rec.subject_table_name:='HZ_PARTIES'; p_org_contact_rec.party_rel_rec.object_id:= 488974; -- value of party_id from step 1 p_org_contact_rec.party_rel_rec.object_type:='ORGANIZATION'; p_org_contact_rec.party_rel_rec.object_table_name:='HZ_PARTIES'; p_org_contact_rec.party_rel_rec.relationship_type:='CONTACT'; p_org_contact_rec.party_rel_rec.relationship_code:='CONTACT_OF'; p_org_contact_rec.party_rel_rec.status := 'A'; --For Organization Address level contact, assign following value: --p_org_contact_rec.party_site_id:=357430; -- value of party_site_id from step 3 Output: x_org_contact_id = 186069 x_party_rel_id = 643026 x_party_id = 490975 x_party_number = 55488 Query Data: select org_contact_id, party_relationship_id from hz_org_contacts where org_contact_id = 186069; ORG_CONTACT_ID PARTY_RELATIONSHIP_ID -------------- --------------------- 186069 643026
  • 15. Relationship: select relationship_id, subject_id, subject_type, subject_table_name, object_id, object_type, object_table_name, directional_flag relationship_type, relationship_code, party_id from hz_relationships where relationship_id = 643026; RELATIONSHIP_ID SUBJECT_ID SUBJECT_TYPE SUBJECT_TABLE_NAME OBJECT_ID OBJECT_TYPE OBJECT_TABLE_NAME DIRECTIONAL_FLAG RELATIONSHIP_TYPE RELATIONSHIP_CODE PARTY_ID 643026 488974 ORGANIZATION HZ_PARTIES 490974 PERSON HZ_PARTIES B CONTACT 490975 643026 490974 PERSON HZ_PARTIES 488974 ORGANIZATION HZ_PARTIES F CONTACT_OF 490975 Relationship party: select party_id, party_number, party_type, party_name from hz_parties where party_id = 490975; PARTY_ID PARTY_NUMBER PARTY_TYPE PARTY_NAME 490975 55488 PARTY_RELATIONSHIP Ash Lee-Model Artworks- 55488 Navigation: Oracle Customers Online> Customers> Organizations> Query Name = Model Artworks> Click on Name link> Relationships> Contacts
  • 16. 8. Organization Contact Address – Create Location API:HZ_LOCATION_V2PUB.create_location Record type variables: p_location_rec HZ_LOCATION_V2PUB.LOCATION_REC_TYPE; Output variables: x_location_id NUMBER; Values to pass to API: p_location_rec.country := 'SG'; p_location_rec.address1 := '2 Robinson Road'; p_location_rec.city := 'Singapore'; p_location_rec.postal_code := '601020'; p_location_rec.created_by_module := 'TCA_V2_API'; Output: x_location_id: 28985 Query Data: select location_id,address1,city,postal_code from hz_locations where location_id = 28985; LOCATION_ID ADDRESS1 CITY POSTAL_CODE 28985 2 Robinson Road Singapore 601020
  • 17. 9. Organization Contact Address - Create Party Site API:HZ_PARTY_SITE_V2PUB.create_party_site Record type variables: p_party_site_rec HZ_PARTY_SITE_V2PUB.PARTY_SITE_REC_TYPE; Output variables: x_party_site_id NUMBER; x_party_site_number VARCHAR2(2000); Values to pass to API: p_party_site_rec.party_id := 490975; -- value of party_id from step 7 p_party_site_rec.location_id := 28985; -- value of location_id from step 8 p_party_site_rec.identifying_address_flag := 'Y'; p_party_site_rec.created_by_module := 'TCA_V2_API'; Output: x_party_site_id: 358431 x_party_site_number: 26185 Query Data: select party_site_id, party_id, location_id, party_site_number from Hz_party_sites where party_site_id = 358431; PARTY_SITE_ID PARTY_ID LOCATION_ID PARTY_SITE_NUMBER 358431 488975 28985 26185 Navigation: Oracle Customers Online> Customers> Organizations> Query Name = Model Artworks> Click on Name link> Relationships> Contacts – Address
  • 18. 10. Organization Contact - Create Contact Point – Phone number API:HZ_CONTACT_POINT_V2PUB.create_contact_point Record type variables: p_contact_point_rec HZ_CONTACT_POINT_V2PUB.CONTACT_POINT_REC_TYPE; Output variables: p_edi_rec HZ_CONTACT_POINT_V2PUB.EDI_REC_TYPE; p_email_rec HZ_CONTACT_POINT_V2PUB.EMAIL_REC_TYPE; p_phone_rec HZ_CONTACT_POINT_V2PUB.PHONE_REC_TYPE; p_telex_rec HZ_CONTACT_POINT_V2PUB.TELEX_REC_TYPE; p_web_rec HZ_CONTACT_POINT_V2PUB.WEB_REC_TYPE; x_contact_point_id NUMBER; Values to pass to API: p_contact_point_rec.contact_point_type := 'PHONE'; p_contact_point_rec.owner_table_name := 'HZ_PARTIES'; p_contact_point_rec.owner_table_id := '490975'; -- value of party_id from step 7 p_contact_point_rec.primary_flag := 'Y'; p_contact_point_rec.contact_point_purpose := 'BUSINESS'; p_phone_rec.phone_country_code := '65'; p_phone_rec.phone_number := '6777-1212'; p_phone_rec.phone_line_type := 'GEN'; p_contact_point_rec.created_by_module := 'TCA_V2_API'; Output:
  • 19. x_contact_point_id: 350447 Query Data: select contact_point_id, contact_point_type, owner_table_name, owner_table_id, primary_flag, phone_country_code, phone number from hz_contact_points where contact_point_id = 350447; CONTACT_ CONTACT_ OWNER_ OWNER_ PRIMARY PHONE_ PHONE_ POINT_ID POINT_TYPE TABLE_NAME TABLE_ID _FLAG COUNTRY_ NUMBER CODE 350447 PHONE HZ_PARTIES 490975 Y 65 6777-1212 Navigation: Oracle Customers Online> Customers> Organizations> Query Name = Model Artworks> Click on Name link> Relationships> Contacts – Phone 11. Create Customer Account Role (Link Organization Contact to Customer Account) API:HZ_CUST_ACCOUNT_ROLE_V2PUB.create_cust_account_role Record type variables: p_cust_account_role_recHZ_CUST_ACCOUNT_ROLE_V2PUB.CUST_ACCOUNT_ROLE_REC_TYPE; Output variables: x_cust_account_role_id NUMBER; Values to pass to API:
  • 20. p_cust_account_role_rec.created_by_module := 'TCA_V2_API'; p_cust_account_role_rec.party_id := 490975; -- value of party_id from step 7 p_cust_account_role_rec.cust_account_id := 252705; -- value of cust_account_id from step 1 p_cust_account_role_rec.role_type := 'CONTACT'; p_cust_account_role_rec.status := 'A'; -- Note: If contact is at site level, assign value to cust_acct_site_id --p_cust_account_role_rec.cust_acct_site_id := 13903; Output: x_cust_account_role_id=81851 Query Data: select cust_account_role_id, party_id, cust_account_id, cust_acct_site_id, role_type from hz_cust_account_roles where cust_account_role_id = 81851; CUST_ACCOUNT_ROLE_ID PARTY_ID CUST_ACCOUNT_ID CUST_ACCT_SITE_ID ROLE_TYPE 81851 490975 252705 CONTACT Navigation: Receivables> Customers> Account – Model Artworks Asia [Details]> Communication> Account Contacts
  • 21. Receivables> Customers> Account – Model Artworks Asia [Details]> Communication> Account Contacts [Details]
  • 22. 12. Create Customer Account Role Responsibility API:HZ_CUST_ACCOUNT_ROLE_V2PUB.create_role_responsibility Record type variables: p_role_responsibility_rec HZ_CUST_ACCOUNT_ROLE_V2PUB.role_responsibility_rec_TYPE; Output variables: x_responsibility_id NUMBER; Values to pass to API: p_role_responsibility_rec.created_by_module := 'TCA_V2_API'; p_role_responsibility_rec.cust_account_role_id:=81851; -- value of cust_account_role_id from step 11 p_role_responsibility_rec.primary_flag:='Y'; p_role_responsibility_rec.responsibility_type:='BILL_TO'; Output: x_responsibility_id=34406 Query Data: select responsibility_id,cust_account_role_id,responsibility_type,prima ry_flag from hz_role_responsibility where responsibility_id = 34406; RESPONSIBILITY_ID CUST_ACCOUNT_ROLE_ID RESPONSIBILITY_TYPE PRIMARY_FLAG 34406 81851 BILL_TO Y Navigation: Receivables> Customers> Account – Model Artworks Asia [Details]> Communication> Account Contacts [Details] > Contact Roles