Vous êtes sur la page 1sur 3

Customer APIs hz_party_v2pub.create_organization Org Contact Role Hz_party_contact_v2pub.Create_Org_Contact_Role Relationships HZ_CUST_ACCOUNT_V2PUB.CREATE_CUST_ACCT_RELATE Customer Profile HZ_CUSTOMER_PROFILE_V2PUB.

create_customer_profile Customer Profile Amount HZ_CUSTOMER_PROFILE_V2PUB. create_cust_profile_amt Customer Credit Rating HZ_PARTY_INFO_V2PUB.create_credit_rating Sales Person JTF_RS_SALESREPS_PUB.CREATE_SALESREP Sales reps Territories JTF_RS_SRP_TERRITORIES_PUB.CREATE_RS_SRP_TERRITORIES Customer contacts HZ_CUST_ACCOUNT_ROLE_V2PUB.CREATE_CUST_ACCOUNT_ROLE Customer Contact Role HZ_CUST_ACCOUNT_ROLE_V2PUB.create_role_responsibility How to Create Contact,Phone, Email under Communication tab for Customer Account Site using API [ID 985500.1] Customer Account Creation Using TCA APIs [ID 837568.1]

Customer Contacts Migration Oracle Receivables Hi CREATE OR REPLACE PROCEDURE SRIDHAR_CUST_PHONES AS CURSOR CHECK_CST is SELECT DISTINCT cust.orig_system_reference orig_system_customer_ref , ACCT.ORIG_SYSTEM_REFERENCE orig_system_address_ref, CUST.cust_account_id CUSTOMER_ID, CUST.ACCOUNT_NUMBER XXPS_CUSTOMER_NUMBER FROM hz_cust_accounts cust, hz_cust_acct_sites_all acct, hz_cust_site_uses_all ship, hz_party_sites party_site, hz_locations loc, hz_parties party WHERE cust.cust_account_id = acct.cust_account_id AND acct.cust_acct_site_id = ship.cust_acct_site_id AND acct.org_id = ship.org_id AND cust.status = 'A' and ship.SITE_USE_CODE ='BILL_TO' AND loc.location_id = party_site.location_id AND acct.party_site_id = party_site.party_site_id AND cust.party_id = party.party_id AND ship.org_id = 105; -- AND cust.cust_account_id=129665; CURSOR INST_IFACE(Vcust_id number) IS select DISTINCT rp.PHONE_ID, rp.PHONE_NUMBER,rp.PHONE_TYPE,rp.AREA_CODE, rc.LAST_NAME,rc.TITLE, rc.FIRST_NAME from ra_phones RP,ra_contacts rc , ra_customers ra where ra.customer_id =Vcust_id and ra.CUSTOMER_ID = rp.customer_id(+) and ra.customer_id= rc.customer_id(+); strPhone_type varchar2(20); strFax_type varchar2(20); Vorig_system_customer_ref varchar2(20); Vorig_system_address_ref varchar2(20); strContact_ref varchar2(20);

strTel_ref varchar2(20); VCOUNTRY_CODE varchar2(10); numCount number:=1; strErrors VARCHAR2(200); BEGIN BEGIN SELECT lookup_code INTO strPhone_type FROM apps.ar_lookups WHERE lookup_type = 'PHONE_LINE_TYPE' AND UPPER (TRIM(meaning) ) = UPPER ('TELEPHONE') AND enabled_flag = 'Y' AND NVL ( start_date_active, SYSDATE - 1 ) <= SYSDATE AND NVL ( end_date_active , SYSDATE + 1 ) > SYSDATE; EXCEPTION WHEN NO_DATA_FOUND THEN strErrors := strErrors ' Invalid phone type,' ; WHEN OTHERS THEN NULL; END; BEGIN SELECT lookup_code INTO strFax_type FROM apps.ar_lookups WHERE lookup_type = 'PHONE_LINE_TYPE' AND UPPER(TRIM(meaning)) = UPPER ('FAX') AND enabled_flag = 'Y' AND NVL ( start_date_active, SYSDATE - 1 ) <= SYSDATE AND NVL ( end_date_active , SYSDATE + 1 ) > SYSDATE; EXCEPTION WHEN NO_DATA_FOUND THEN strErrors := strErrors ' Invalid fax type,' ; WHEN OTHERS THEN NULL; END; FOR C in CHECK_CST loop Vorig_system_customer_ref := c.orig_system_customer_ref; Vorig_system_address_ref := c.orig_system_address_ref; FOR I in INST_IFACE(c.CUSTOMER_ID) LOOP begin select phone_country_code INTO VCOUNTRY_CODE from hz_contact_points where contac t_point_id=i.PHONE_ID; EXCEPTION WHEN NO_DATA_FOUND THEN VCOUNTRY_CODE:=''; END; IF i.LAST_NAME IS NOT NULL OR i.FIRST_NAME IS NOT NULL THEN LOOP SELECT TO_CHAR ( HZ_CUST_ACCOUNT_ROLES_S.NEXTVAL ) INTO strContact_ref FROM dual;

BEGIN SELECT COUNT(*) INTO numCount FROM apps.hz_cust_account_roles WHERE TRIM(orig_system_reference) = TRIM(strContact_ref); EXCEPTION when no_data_found then numCount := 0; WHEN OTHERS THEN NULL; END; EXIT WHEN numCount = 0; END LOOP; ELSE strContact_ref := ''; END IF; strTel_ref := ''; IF i.PHONE_NUMBER IS NULL AND (i.LAST_NAME IS NOT NULL OR i.FIRST_NAME IS NOT NU LL) THEN INSERT INTO apps.ra_contact_phones_int_all ( orig_system_customer_ref , orig_system_contact_ref , orig_system_address_ref , orig_system_telephone_ref , contact_first_name , contact_last_name , phone_country_code , telephone_area_code , telephone , insert_update_flag , last_update_date , last_updated_by , creation_date , created_by , org_id ) VALUES ( Vorig_system_customer_ref , strContact_ref , Vorig_system_address_ref , strTel_ref , i.FIRST_NAME , i.LAST_NAME , VCOUNTRY_CODE , i.AREA_CODE , SUBSTR(i.PHONE_NUMBER,1,25) , 'I' , SYSDATE , 3936 , SYSDATE , 3936 , 105); -- numCustContactCount := numCustContactCount+1; END IF;

Vous aimerez peut-être aussi