Beruflich Dokumente
Kultur Dokumente
Order Management) implementations in setting the organizations and event subscription appropriately for the Product Synchronization between Oracle E-Business Suite and Siebel CRM.
Table of Contents
A.
Organization Data Setup for Product Synchronization ......................................................................... 3 Background ............................................................................................................................................... 3 Organization definitions and relationships in the participating Applications .......................................... 3 Oracle E-Business Suite ......................................................................................................................... 3 Siebel CRM ............................................................................................................................................ 4 AIA Organization Mapping ................................................................................................................. 4 AIA Inventory Location Mapping ....................................................................................................... 4 Order-to-Cash Product Synchronization Behavior.................................................................................... 5 Scenario #1: Each Operating Unit has a distinct (non-shared) Item Validation Org ............................ 6 Scenario #2: The Item Validation Org is shared across multiple Operating Units ............................... 8 Scenario #3: Item Master Org is the Item Validation Org, and shared across Operating Units ......... 10
B.
Custom Subscription PL-SQL for Product Sync Events ........................................................................ 13 Background ............................................................................................................................................. 13 Recommendation.................................................................................................................................... 13 Steps to Register the PLSQL Subscription ............................................................................................... 13 PLSQL Code ............................................................................................................................................. 14
Table of Figures
Figure 1: Product Integration: Oracle E-Biz to Siebel Logical Data Map ....................................................... 5
Siebel CRM The Business Unit Organization in Siebel allows the implementation company to partition itself into logical groups. Then the information associated the business unit can be displayed to the end users associated to that business unit (BU) only. The transaction data in Siebel (viz. Sales Order) is always associated to a business unit (the primary business unit). In Siebel, though an Order would be associated to a specific Business Unit, products from different business units can be associated on the Order lines. In other words, unlike Oracle E-Biz, the reference data for a transaction can belong to a different organization in Siebel. A Product in Siebel is always associated with a Business Unit, which becomes its Primary Business Unit. Multiple Business Units can be associated with a product as well. The unique key to product in Siebel is Product Name, Business Unit, and Vendor Account (optional - not mapped). Inventory Locations in Siebel are used to identify where products are stored, and the source from which the product will be fulfilled. An inventory location may be a warehouse, a field office, or it may be virtual location. An Inventory Location is also associated to a Business Unit. It should be noted that in Siebel there is no equivalent of E-Bizs Item Master Organization or Item Validation Organization. AIA Organization Mapping The concepts of Business Unit in Siebel, and Operating Unit in Oracle E-Biz map directly, and thus in the Order to Cash PIP, one-to-one mapping for them across the applications is assumed. An organization XRef mapping is setup as described in Chapter 13 of the Order-to-Cash implementation guide.
AIA
It is possible that there could be many Operating Units defined in Oracle E-Biz, or multiple Business Units in Siebel. From an Order processing perspective only specific business units and operating units will need to be mapped in the X-Ref where Order capture would be done in Siebel, and corresponding fulfillment in Oracle E-Biz. AIA Inventory Location Mapping There could be multiple Inventory Organizations in Oracle E-Biz for an Item. But from Order capture perspective, only those Inventory Organizations that are associated as Item Validation Organizations for the Item in Oracle E-Biz should be defined as Inventory Locations in Siebel.
The Business Unit of the Inventory Location being created in Siebel should be mapped to the Operating Unit of the Item Validation Org in E-Biz. In the Roll-up patch (RUP) # 9543544 for the AIA Order to Cash PIP 2.5, a new XREF column SEBL_01_INVLOC_BU has been added to the INVENTORY_LOCATION_ID XREF to capture the Primary BU in Siebel for a given Inventory Location. It is optional, and needs to be setup only if the Item Validation Organization is shared by multiple Operating Units. In such case(s) the primary Business Unit for the Inventory Location needs to be defined. Scenario #2 and #3 provided in this document illustrate this use case.
Units will be synced, and X-refs created. Thus, in Siebel same product will be created for different Business Units individually. Since the Item Validation Org could be shared across multiple Operating Units in E-Biz, thus all the corresponding Business units may have to be associated to the product in Siebel. It would depend on how product visibility is setup in Siebel. If Catalog based (Enterprise level) visibility is setup in Siebel, then associating additional Business Units may not be required. However, if Organization based visibility is setup in Siebel for products, then the additional non-primary (Multi-Org) business unit would have to be manually associated to the product. If the Master Org is also the Item Validation Org, then those item records with the Master Org IDs will be synchronized, and X-Ref created. If the Master Org is not the Item Validation Org, then the item records with the master org are ignored for creating X-Ref.
Based on the above there can be various combinations of Organization setup and Item/Product definition across the two applications. In this document, few best practice scenarios are provided on how to setup the Organization X-Ref mappings -- and based on this setup how Product sync to Siebel will take place, and the Product X-Ref will be established is also described. (Note: it is possible that there may be other setup options that customers make that may not be supported, which may need customization.) Scenario #1: Each Operating Unit has a distinct (non-shared) Item Validation Org The scenario description is as following: a) Only one Master Organization exists in E-Biz. All Items are defined in this Master Org. b) Each Operating Unit is associated with a distinct Item Validation Organization. In other words, item Validation Org is not shared across Operating Units. c) The Item Master Organization is not associated as the Item Validation Org to any of the Operating Units in which an Order can be placed. d) The Parent Operating Unit of the Inventory Organization may (or may not) be an Operating Unit in which Orders can be placed.
Operating Units (OU) in Oracle E-Biz Name ID 1 2 3 4 5 6 7 8 United States OU Purple OU Red OU Yellow OU White OU Orange OU Green OU Blue OU 504 505 506 507 509 510 511 512
OE Item Validation Org n/a Beta IO Gamma IO Delta IO n/a n/a n/a n/a
Comment
Inventory Organizations (IO) in Oracle E-Biz Name ID Parent Operating Unit 1 Alpha IO 750 United States OU (Item Master Org) 2 Beta IO 751 White OU 3 Gamma IO 752 Orange OU 4 Delta IO 753 Green OU 5 Phi IO 754 Blue OU 6 Kappa IO 755 Purple OU Business Units (BU) in Siebel Name Purple BU Red BU Yellow BU Brown BU
ROW_ID Used for Order Capture 1-AC Yes 1-AD Yes 1-AE Yes 1-AG No
Comment
Inventory Locations (IL) in Siebel (The Item Validation Orgs from E-Biz) Name ID Primary Business Comment Unit Beta IL 1-XB Purple BU Gamma IL 1-XC Red BU Delta IL 1-XD Yellow BU
AIA ORGANIZATION_ID X-Ref Oracle E-Biz ID 505 (Purple OU) 506 (Red OU) 507 (Yellow OU)
Common C1 C2 C3
Siebel ID 1-AC (Purple BU) 1-AD (Red BU) 1-AE (Yellow BU)
Comment
Note: The values in parenthesis are just for explanation, they do not go into X-Ref.
AIA INVENTORY_LOCATION_ID X-Ref Oracle E-Biz ID Common 751 (Beta IL) C51 752 (Gamma IL) C52 753 (Delta IL) C53
Siebel ID 1-XB (Beta IL) 1-XC (Gamma IL) 1-XD (Delta IL)
Comment
Note: The values in parenthesis are just for explanation, they do not go into X-Ref.
Based on above Organization setup, the E-Biz Item will be synced in the following manner as Siebel Product.
10 10 10 10 20 20
Inv Org ID 750 (Alpha IO) 751 (Beta IO) 752 (Gamma IO) 753 (Phi IO) 751 (Beta IO) 755 (Kappa IO)
Parent OU 504 (US OU) 509 (White OU) 510 (Orange OU) 512 (Blue OU) 509 (White OU) 505 (Purple OU)
Comment
Primary Business Unit ID 1-AC (Purple BU) 1-AD (Red BU) 1-AC (Purple BU)
Comment
The AIA X-Ref will contain the following information for this Product Synchronization scenario:
Type Siebel ID E-Biz ID Common
Scenario #2: The Item Validation Org is shared across multiple Operating Units The scenario description is as following: a) Only one Master Organization in E-Biz. All Items are defined in this Master Org. b) The same Inventory Organization is specified as the Item Validation Organization in the profile option across multiple Order capturing Operating Units. i. It implies that there would be single corresponding Inventory Location created in Siebel. However, the Business Unit to be specified for this single Inventory Location in Siebel could be corresponding to any of the Operating Units (for that Item Validation Org). ii. Whichever Business Unit is chosen to be specified for the Inventory Location, it would become the Primary Business Unit on the Product created on synchronization. iii. All other related Business Units for the given Product will have to be manually associated within Siebel Product Definition. This might be only necessary if Organization based visibility is setup in Siebel for the users (if default Catalog based visibility is used, associating the other Business Units manually may not be required). c) The Master organization could be this Item validation Org across multiple Operating Units in which order can be placed. d) The Parent OU associated with Inventory Organization also may (or may not) be the Operating Unit against which Orders are going to be placed
Operating Units (OU) in Oracle E-Biz Name ID 1 2 3 4 5 6 7 8 United States OU Purple OU Red OU Yellow OU White OU Orange OU Green OU Blue OU 504 505 506 507 509 510 511 512
OE Item Validation Org n/a Beta IO Beta IO Beta IO n/a n/a n/a n/a
Comment
Inventory Organizations (IO) in Oracle E-Biz Name ID Parent Operating Unit 1 Alpha IO 750 United States OU (Item Master Org) 2 Beta IO 751 White OU 3 Gamma IO 752 Orange OU 4 Delta IO 753 Green OU 5 Phi IO 754 Blue OU 6 Kappa IO 755 Purple OU Business Units (BU) in Siebel Name Purple BU Red BU Yellow BU Brown BU
ROW_ID Used for Order Capture 1-AC Yes 1-AD Yes 1-AE Yes 1-AG No
Comment
Inventory Locations (IL) in Siebel (The Item Validation Orgs from E-Biz) Name ID Primary Business Comment Unit Beta IL 1-XB Purple BU
AIA ORGANIZATION_ID X-Ref Oracle E-Biz ID 505 (Purple OU) 506 (Red OU) 507 (Yellow OU)
Common C1 C2 C3
Siebel ID 1-AC (Purple BU) 1-AD (Red BU) 1-AE (Yellow BU)
Comment
Note: The values in parenthesis are just for explanation, they do not go into X-Ref.
AIA INVENTORY_LOCATION_ID X-Ref Oracle E-Biz ID Common SEBL_01 751 (Beta IL) C51 1-XB (Beta IL)
Note: The values in parenthesis are just for explanation, they do not go into X-Ref.
Based on above Organization setup, the Item will be synced in the following manner to Siebel Product. Item Definition in Oracle E-Biz
Item Name Item ID
10 10 10 10 20 20 20
Inv Org ID 750 (Alpha IO) 751 (Beta IO) 752 (Gamma IO) 753 (Phi IO) 750 (Alpha IO) 751 (Beta IO) 755 (Kappa IO)
Parent OU 504 (US OU) 509 (White OU) 510 (Orange OU) 512 (Blue OU) 504 (US OU) 509 (White OU) 505 (Purple OU)
Comment
Comment
Item A
1-PD1
1-AE (Yellow BU) Item B 1-PD3 1-AC (Purple BU) 1-AD (Red BU), 1-AE (Yellow BU) If required, the non-primary Business Unit (multi-org) would have to be manually setup for the product in Siebel. The AIA X-Ref will contain the following information for this Product Synchronization scenario:
Type Siebel ID E-Biz ID Common
ITEM_ITEMID ITEM_ITEMID
1-PD1 1-PD3
10::751::509 20::751::509
C101 C103
Scenario #3: Item Master Org is the Item Validation Org, and shared across Operating Units The scenario description is as following: a) Only one Item Master Organization in E-Biz. All Items are defined in this Master Org. b) The Item Master Organization also serves as the Item Validation Organization in the profile option across multiple Order capturing Operating Units. i. It implies that there would be single corresponding Inventory Location created in Siebel. However, the Business Unit to be specified for this single Inventory Location in Siebel could be corresponding to any of the Operating Units (for that Item Validation Org). ii. Whichever Business Unit is chosen to be specified for the Inventory Location, it would become the Primary Business Unit on the Product created on synchronization. iii. All other related Business Units for the given Product will have to be manually associated within Siebel Product Definition. This might be only necessary if Organization based visibility
10
is setup in Siebel for the users (if default Catalog based visibility is used, associating the other Business Units manually may not be required). c) The Parent OU associated with Inventory Organization also may (or may not) be the Operating Unit against which Orders are going to be placed Operating Units (OU) in Oracle E-Biz Name ID 1 2 3 4 5 6 7 8 United States OU Purple OU Red OU Yellow OU White OU Orange OU Green OU Blue OU 504 505 506 507 509 510 511 512
OE Item Validation Org n/a Alpha IO Alpha IO Alpha IO n/a n/a n/a n/a
Comment
Inventory Organizations (IO) in Oracle E-Biz Name ID Parent Operating Unit 1 Alpha IO 750 United States OU (Item Master Org) 2 Beta IO 751 White OU 3 Gamma IO 752 Orange OU 4 Delta IO 753 Green OU 5 Phi IO 754 Blue OU 6 Kappa IO 755 Purple OU Business Units (BU) in Siebel Name Purple BU Red BU Yellow BU Brown BU
ROW_ID Used for Order Capture 1-AC Yes 1-AD Yes 1-AE Yes 1-AG No
Comment
Inventory Locations (IL) in Siebel (The Item Validation Orgs from E-Biz) Name ID Primary Business Comment Unit Alpha IL 1-XM Purple BU
11
AIA ORGANIZATION_ID X-Ref Oracle E-Biz ID 505 (Purple OU) 506 (Red OU) 507 (Yellow OU)
Common C1 C2 C3
Siebel ID 1-AC (Purple BU) 1-AD (Red BU) 1-AE (Yellow BU)
Comment
Note: The values in parenthesis are just for explanation, they do not go into X-Ref.
AIA INVENTORY_LOCATION_ID X-Ref Oracle E-Biz ID Common Siebel ID 750 (Alpha IL) C51 1-XM (Alpha IL)
Note: The values in parenthesis are just for explanation, they do not go into X-Ref.
Based on above Organization setup, the Item will be synced in the following manner to Siebel Product. Item Definition in Oracle E-Biz
Item Name Item ID
10 10 10 10 20 20 20
Inv Org ID 750 (Alpha IO) 751 (Beta IO) 752 (Gamma IO) 753 (Phi IO) 750 (Alpha IO) 751 (Beta IO) 755 (Kappa IO)
Parent OU 504 (US OU) 509 (White OU) 510 (Orange OU) 512 (Blue OU) 504 (US OU) 509 (White OU) 505 (Purple OU)
Comment
Comment
Item A
1-PD1
1-AE (Yellow BU) Item B 1-PD3 1-AC (Purple BU) 1-AD (Red BU), 1-AE (Yellow BU) If required, the non-primary Business Unit (multi-org) would have to be manually setup for the product in Siebel. The AIA X-Ref will contain the following information for this Product Synchronization scenario:
Type Siebel ID E-Biz ID Common
ITEM_ITEMID ITEM_ITEMID
1-PD1 1-PD3
10::750::504 20::750::504
C101 C103
12
13
3. Register the above PLSQL function as the subscription rule function for the events oracle.apps.ego.item.postItemUpdate and oracle.apps.ego.item.postItemCreate. The steps for it are as follows: a. Login to Oracle Applications, and choose the Workflow Administrator Web Application responsibility. b. Navigate to Administrator Workflow -> Business Events. c. Search for the event oracle.apps.ego.item.postItemCreate, and click on the Subscription icon from the results table. d. You should see a subscription with the following values: Agent: WF_BPEL_QAGENT@<instance_name> Function: WF_RULE.DEFAULT_RULE e. Edit it, and change the rule-function to: xx_custom_event.xx_item_event. f. Repeat the steps c, d, and e for the event oracle.apps.ego.item.postItemUpdate as well.
PLSQL Code
create or replace PACKAGE xx_custom_event AS FUNCTION xx_item_event( p_subscription_guid in raw ,p_eventP in out NOCOPY wf_event_t) RETURN VARCHAR2; END xx_custom_event; / create or replace PACKAGE BODY xx_custom_event AS FUNCTION xx_item_event( p_subscription_guid in raw ,p_eventP in out NOCOPY wf_event_t) return varchar2 IS x_event_parameter_list wf_parameter_list_t; x_event_src_parameter_list wf_parameter_list_t; x_param wf_parameter_t; x_index NUMBER := 0; TYPE NumberList is TABLE of NUMBER(15) INDEX BY BINARY_INTEGER; l_InvId NUMBER; l_OrgId NUMBER; l_InvIdExist NUMBER := NULL; l_OrgCode VARCHAR2(800); l_InvItemDesc VARCHAR2(800); l_return_status VARCHAR2(240); l_param_name VARCHAR2(240); l_param_value VARCHAR2(2000); l_master_organization_id NUMBER; l_itemValidationOrgs NumberList; BEGIN -- REPLACE THIS. List of Item validation Orgs which needs event consideration. l_itemValidationOrgs(1):=911; -- Visions operations l_itemValidationOrgs(2):=207; -- Seattle manufacturing -- REPLACE THIS. Id of Master Organization l_master_organization_id:=204; l_InvId := to_number(wf_event.getValueForParameter('INVENTORY_ITEM_ID',p_eventP.Parameter_List));
14
l_OrgId := to_number(wf_event.getValueForParameter('ORGANIZATION_ID',p_eventP.Parameter_List)); l_OrgCode := wf_event.getValueForParameter('ORGANIZATION_CODE',p_eventP.Parameter_List); l_InvItemDesc := wf_event.getValueForParameter('ITEM_DESCRIPTION',p_eventP.Parameter_List); -- If the Organization Id in the event for the product is same as Master Organization raise an event for every Item Validation Org x_event_src_parameter_list := p_eventP.GETPARAMETERLIST(); IF l_OrgId=l_master_organization_id THEN -- Raise Event for each itemValidationOrg FOR I in 1..l_itemValidationOrgs.COUNT LOOP x_index:=0; x_event_parameter_list := wf_parameter_list_t(); select inventory_item_id into l_InvIdExist from ego_item_sync_v ego where inventory_item_id=l_InvId and organization_id=l_itemValidationOrgs(I); IF l_InvIdExist IS NOT NULL THEN FOR J IN x_event_src_parameter_list.FIRST..x_event_src_parameter_list.LAST LOOP l_param_name := x_event_src_parameter_list(J).getname; l_param_value := x_event_src_parameter_list(J).getvalue; x_param := wf_parameter_t(NULL,NULL); x_event_parameter_list.EXTEND; IF ((l_param_name = 'INVENTORY_ITEM_ID') ) THEN x_param.setname('INVENTORY_ITEM_ID'); x_param.setvalue(l_InvId); ELSIF ((l_param_name = 'ORGANIZATION_ID') ) THEN x_param.setname('ORGANIZATION_ID'); x_param.setvalue(l_itemValidationOrgs(I)); ELSIF ((l_param_name = 'ITEM_DESCRIPTION') ) THEN x_param.setname('ITEM_DESCRIPTION'); x_param.setvalue(l_InvItemDesc); ELSIF ((l_param_name = 'ORGANIZATION_CODE') ) THEN x_param.setname('ORGANIZATION_CODE'); x_param.setvalue(l_OrgCode); ELSE x_param.setname(l_param_name); x_param.setvalue(l_param_value); END IF; x_index := x_index + 1; x_event_parameter_list(x_index) := x_param; END LOOP; p_eventP.setParameterList(x_event_parameter_list); l_return_status:=WF_RULE.DEFAULT_RULE(p_subscription_guid=>p_subscription_guid,p_event=>p_eve ntP); COMMIT; END IF; END LOOP; ELSE -- Check if the Org id in the Event is Item Validation Org (If found in the list of Item Validation Org), raise an event for the Org. FOR I in 1..l_itemValidationOrgs.COUNT LOOP -- Iterate through the above declared list of Item Validation Organizations IF l_OrgId = l_itemValidationOrgs(I) THEN x_index:=0; x_event_parameter_list := wf_parameter_list_t(); select inventory_item_id into l_InvIdExist from ego_item_sync_v ego where inventory_item_id=l_InvId and organization_id=l_itemValidationOrgs(I); IF l_InvIdExist IS NOT NULL THEN FOR J IN x_event_src_parameter_list.FIRST..x_event_src_parameter_list.LAST LOOP l_param_name := x_event_src_parameter_list(J).getname;
15
l_param_value := x_event_src_parameter_list(J).getvalue; x_param := wf_parameter_t(NULL,NULL); x_event_parameter_list.EXTEND; IF ((l_param_name = 'INVENTORY_ITEM_ID') ) THEN x_param.setname('INVENTORY_ITEM_ID'); x_param.setvalue(l_InvId); ELSIF ((l_param_name = 'ORGANIZATION_ID') ) THEN x_param.setname('ORGANIZATION_ID'); x_param.setvalue(l_itemValidationOrgs(I)); ELSIF ((l_param_name = 'ITEM_DESCRIPTION') ) THEN x_param.setname('ITEM_DESCRIPTION'); x_param.setvalue(l_InvItemDesc); ELSIF ((l_param_name = 'ORGANIZATION_CODE') ) THEN x_param.setname('ORGANIZATION_CODE'); x_param.setvalue(l_OrgCode); ELSE x_param.setname(l_param_name); x_param.setvalue(l_param_value); END IF; x_index := x_index + 1; x_event_parameter_list(x_index) := x_param; END LOOP; p_eventP.setParameterList(x_event_parameter_list); l_return_status:=WF_RULE.DEFAULT_RULE(p_subscription_guid=>p_subscription_guid,p_event=>p_eve ntP); COMMIT; END IF; END IF; END LOOP; END IF; rETURN l_return_status; END xx_item_event; END xx_custom_event;
16