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