Monday 27 June 2016

TCA Table Architecture

PARTIES


      The related tables are as follows:-
  • HZ_PARTIES : Stores information about parties.
  • HZ_FINANCIAL_PROFILE : Stores information about the financial accounts.
  • HZ_CREDIT_RATINGS : Stores information about the credit rating of parties
  • HZ_REFERENCES : Stores information about reference given by one party about another.
  • HZ_CERTIFICATIONS : Stores information about the certifications given by other parties.

LOGICAL MODEL DIAGRAM


PARTIES – TYPE PERSON


      The tables are as follows:-
  • HZ_PERSON_PROFILES : Stores details information about people.
  • HZ_PERSON_LANGUAGES :Stores information about the language that a person speaks, reads or writes
  • HZ_PERSON_INTEREST : Stores information about a person’s personal interests.
  • HZ_ CITIZENSHIP : Stores information about a person’s claimed nationality.
  • HZ_EDUCATIONS : Store information about a person educations.
  • HZ_EMPLOYMENT_HISTORY : Stores information about where the person has been employed.

LOGICAL MODEL DIAGRAM


 PARTIES – TYPE ORGANIZATION


 The tables are as follows:-
  • HZ_ORGANIZATION_PROFILES : Stores details information about credit rating, financial statistics, socio-economic and corporate linkage information.
  • HZ_STOCK_MARKETS :Stores information about the selling and buying of financial instruments.
  • HZ_SECURITY_ISSUED : Stores information about financial instruments such as stocks and bonds that has been issued by the organization.
  • HZ_INDUSTRIAL_CLASS_APP : It is a intersection tables that link industrial classifications stores in HZ_INDUSTRIAL_CLASSES .
  • HZ_INDUSTRIAL_CLASSES : Stores information about names and descriptions of industrial classifications.
  • HZ_FINANCIAL_REPORTS : Store information details of financial reports that describe the financial status of the party.
  • HZ_INDUSTRIAL_REFERENCE : Stores information about industrial reference for organization.

LOGICAL MODEL DIAGRAM





CUSTOMER ACCOUNTS


The tables are as follows:-
  • HZ_CUST_ACCOUNTS : Stores information about the relationship, if a party becomes a customer. Basically stores information about customer accounts.
  • HZ_CUST_ACCT_SITES_ALL : Stores information about customer sites. One customer can have more then multiple sites.
  • HZ_CUST_SITE_USES_ALL : Stores information about site uses or business purpose. A Single customer site can have multiple sites uses such as Bill To or Ship To.
  • HZ_CUST_ACCT_RELATE_ALL : Stores information about relationships between customer accounts.
  • HZ_CUST_ACCOUNT_ROLES : Stores information about the roles that parties perform in customer accounts.
  • HZ_BILLING_PREFERENCES : It describe the invoicing format preferred by customer accounts or customer account sites.
  • HZ_CUSTOMER_PROFILES : Stores credit information for a customer account and customer account sites.
  • HZ_CUST_PROFILE_AMTS : Stores profile amount limits for every currency defined for a customer account or customer account site profile.
  • HZ_CUST_PROF_CLASS_AMTS :Stores customer profile class amount limits for currency.
  • HZ_CUST_PROFILE_CLASSES : Stores standard credit profile classes.

LOGICAL MODEL DIAGRAM






CONTACT POINTS


      The tables are as follows:-
  • HZ_CONTACT_POINTS : Stores electronic methods of communicating with entities such as parties, party site. Each record in this table represents s different means of contacting an entity.
  • HZ_CUST_CONTACT_POINTS : This table is used to tie a contact point to a customer account, customer account site or customer account role.
  • HZ_CONTACT_RESTRICTIONS : It stores information about restrictions on contacting parties.

LOGICAL MODEL DIAGRAM




SITES/LOCATIONS


      The tables are as follows:-

  • HZ_PARTIES_SITES : Stores information about parties and locations.  Because there is a many-to-many relationship between parties and locations.
  • HZ_PARTIES_SITE_USES : Stores information about the party site uses and business purposes. A party site can have multiple site uses such as ‘bill to’ or ‘ship to’ and each site is stores as a record in this table.
  • HZ_LOCATIONS : Stores information about the locations, namely, address information
  • HZ_LOC_ASSIGNMENTS : It ties locations stored in HZ_LOCATIONS to a LOC_ID stored in AR_LOCATIONS_COMBINATIONS

LOGICAL MODEL DIAGRAM



TCA Entity Descriptions


Describe the major entities contained within the TCA Customer model.
·    Parties: Party is an entity that enters into a business relationship. There are four types of parties –
§  Organization  
§  People           
§  Groups        
§  Relationship
·   Locations: A Location is a point in geographical space.
·   Party Sites: A Party Site links a Party with Locations. Parties can be associates to one or more locations and locations can be associate to one or more Parties.
·  Party Site Uses: A Party Site use describes the usage of locations (e.g., mailing address, billing address etc.)
·  Party Relationships: A Party relationship allows for the linking of any two parties. When two parties are connected via a party relationship type is assigned, which describe the relationship.
·   Contacts: A Contact is a party that serves as a contact for another party. e.g., A person is a contact for another person or a organizations is a contact for another organization.
·  Contact Points: Contact points store electronic methods of communicating with entities such as parties and party sites.
·  Customer Accounts: Customer accounts represent a business relationship. When a party becomes a customer an account is created and associated to the party to track the attributes of the customer relationship. A party can have more then one account.
·  Customer Account Sites: A Customer Account site is a party site that is used within the context of a Customer account.
·   Customer Account Contacts: A Customer Account Contact is a contact that is used in the context of a Customer Account.

Difference between Party and Customer

CRM is the acronym for Customer Relationship Management. CRM is basically a marketing tool. If you understand the definition of the word “marketing”, you will easily understand the difference between a party and customer. Marketing is the process of identifying, creating and retaining a customer. CRM tools essentially deal with that process. It is used by companies to identify potential customers, make them buy something from the company; maintain effective relationships with them to retain them for repeat purchases as well. This is what CRM does.

Who is Party and how it is used?
A party is anybody that exists. He/She/It does not have to have bought something from the company earlier. In fact, they do not have any relationship whatsoever with the company. But they are ones who has the potential to have a relationship with the organization in future. This is where CRM come into picture. The tool has been used to identify them and create some marketing campaigns to make them buy something and convert them into the company’s customers, and keep maintaining relationships with them.

What is customer account and how it is used?
As said earlier, if the organization marketing campaigns worked and if some of the identified parties become interested and bought a service or product from the organization then comes the customer. Simply when the identified party bought something from our company then first thing we need to create is the customer account for him and then have all transactions related to it. 

Party:  Mainly used by CRM module
Customer Accounts: Mainly used by Account receivables, Account payables, Order Management and CRM also.

Some technical Insight:

Party information are available in the below tables,

HZ_PARTIES
HZ_PARTY_SITES 
HZ_PARTY_RELATIONSHIPS

Customer Accounts are maintained in the below tables,

HZ_CUST_ACCOUNTS
HZ_CUST_ACCT_SITES_ALL 
HZ_CUST_SITE_USES_ALL 
HZ_CUST_ACCOUNT_ROLES
HZ_CUST_ACCT_RELATE_ALL
With reference to party_id column 

Important Note while merging: 
For Example Party ‘A’ has ‘B’ and ‘C’ two Customer accounts and party ‘X’ has ‘Y’ and ‘Z’ two customer accounts. If you want to merge Customer Accounts ‘B’ and ‘C’ with ‘Y’ and ‘Z’, then first we need to perform Party merge and then perform the customer merge. It operates on the simple logic, First Parent records need to be merged before merging the child records

Steps to start/stop Workflow Notification Mailer (fnd_svc_component)


1. Check workflow mailer service current status

SELECT running_processes
FROM fnd_concurrent_queues
WHERE concurrent_queue_name ='WFMLRSVC';
Note : Number of running processes > 0 

2. Find current mailer status

SELECT component_status
  FROM fnd_svc_components
 WHERE component_id =(SELECT component_id
                        FROM fnd_svc_components
                       WHERE component_name ='Workflow Notification Mailer');

Possible statuses are :
    RUNNING 
   STARTING 
   STOPPED_ERROR 
   DEACTIVATED_USER 
   DEACTIVATED_SYSTEM
 

3. Stop notification mailer 

DECLARE
   p_retcode    NUMBER;
   p_errbuf     VARCHAR2(100);
   m_mailerid   fnd_svc_components.component_id%TYPE;
BEGIN
SELECT component_id
INTO m_mailerid
FROM fnd_svc_components
WHERE component_name ='Workflow Notification Mailer';

   fnd_svc_component.stop_component (m_mailerid,
                                     p_retcode,
                                     p_errbuf
                                    );
COMMIT;
END;
/

4. Start notification mailer 
DECLARE
   p_retcode    NUMBER;
   p_errbuf     VARCHAR2(100);
   m_mailerid   fnd_svc_components.component_id%TYPE;
BEGIN
SELECT component_id
INTO m_mailerid
FROM fnd_svc_components
WHERE component_name ='Workflow Notification Mailer';

   fnd_svc_component.start_component (m_mailerid,
                                      p_retcode,
                                      p_errbuf
                                     );
COMMIT;
END;
/