/
Databuild Purchase Order Integration - Reference
Databuild Purchase Order Integration - Reference
Integrated Fields
The integration of Databuild Purchase Orders to Framework is fixed in the content that is exchanged between the systems. There are no user-configurable integrated fields available to this type of integration.
Database Models
The following database model(s) displays the manner in which data is integrated between the third party application and Framework Integration.
Integration Process
The following information is a low level account of the integration process including criteria, decisions, and outcomes. This information is technical in nature and is provided "as-is" for a detailed analysis of the integration process for system administrators.
- Read profile keys to determine which actions to process.
- Process Cost Centres
- Read all eligible records from Framework table int_cCentreGrp where
- Int_cCentreGrp.l_link_sys_gl_id = -2027 (Databuild)
- Int_cCentreGrp.l_context_id = ‘Context’ (profile key)
- Int_cCentreGrp.l_int_cCentreGrp_id <> 0
- For each record get matching Databuild record in table ccBanks where
- ccBanks.ccBankCode = int_cCentreGrp.s_link_cCentreGrp
- Update the int_cCentreGrp.s_link_name field
- Read all eligible records from Framework table int_cCentre where
- Int_cCentre.l_link_sys_gl_id = -2027 (Databuild)
- Int_cCentre.l_context_id = ‘Context’ (profile key)
- Int_cCentre.l_int_cCentre_id <> 0
- Int_cCentre.l_int_cCentreGrp_id <> 0
- For each record make sure the int_cCentreGrp linked record exists, and if so get the matching databuild record in table costCentres where
- costCentres.code = int_cCentre.s_link_cCentre
- costCentres.tier = int_cCentreGrp.s_link_cCentreGrp
- Read all eligible records from Framework table int_cCentreGrp where
- Process Entities
- Read all eligible records from Framework table int_entity where
- Int_entity.l_link_sys_gl_id = -2027 (Databuild)
- Int_entity.l_context_id = ‘Context’ (profile key)
- Int_entity.l_int_entity_id <> 0
- For each record get matching Databuild record in table supplier where
- Supplier.supplier_code = int_entity.s_link_entity
- Update the int_entity.s_name, int_entity.f_nonCompliance and int_entity.f_preventAlloc fields.
- Get matching int_entityGrp.l_int_EntityGrp_id record where supplier.supp_group = int_entityGrp.s_link_entityGrp, update the int_entity record with the correct group link.
- Read all eligible records from Framework table int_entityGrp where
- Int_entityGrp.l_link_sys_gl_id = -2027 (Databuild)
- Int_entityGrp.l_context_id = ‘Context’ (profile key)
- Int_entityGrp.l_int_entityGrp_id <> 0
- For each record get the matching Databuild record from SupplierGroup where
- SupplierGroup.GroupNumber = int_entityGrp. l_link_entityGroup
- Update the Group name
- Read all eligible records from Framework table int_entity where
- Process Items
- Get all Databuild records from PriceList and PerCodes where PriceList.perCode = PerCode.Code
- For each databuild record get matching Framework record from int_estItem where
- Int_estItem.s_link_item = priceList. PriceCode
- Int_estItem.l_context_id = ‘Context’ (profile key)
- Update Existing records d. Get all Framework records from int_estItem where
- Int_estItem.l_context_id = ‘Context’ (profile key)
- Int_estItem.l_int_estItem_id <> 0
- For each int_estItem record get the Databuild prices from table prices where prices.priceCode = int_estItem.s_link_item
- Look for this price in int_estIPrice where
- Int_estIPrice. l_link_price = prices. Counter If found update, otherwise add the int_estIPrice record
- For each int_estItem record get the Databuild prices from table SuppliersPrices where SuppliersPrices.itemCode = int_estItem.s_link_item
- Look for this price in int_estIPriceE where
- Int_estIPriceE.l_link_price = SuppliersPrices.counter
- If found update, otherwise add the int_estIPriceE record
- Process Orders
- Get eligible Framework jobs from v_sched_dbJobOrders where
- Job.s_link_boq <> ‘N/A’
- Job.l_context_id = ‘Context’ (profile key, if 0 all contexts)
- Job.l_wfl_stgMajor_id = -4(Construction) or job.l_wfl_stgMajor_id = -3(Administration) and job.l_wfl_stgMinor_id = -18(Maintenance) or job.l_wfl_stgMinor_id = -19(Service)
- and apply order criteria where OrderCriteria is
- 2 – Construction Manager • Cst.l_mgr_e_id = ‘OrderCriteriaID’
- 3 – Supervsor • Cst.l_super_e_id = ‘OrderCriteriaID’
- 4 – Single Job • job.s_job_num = ‘OrderCriteriaID’
- For each job get orders and items from Databuild where
- Jobs.job_no = job.s_job_num (job.s_link_boq is used instead if not empty)
- Orders.orderNumber is not null
- Orders.ordered = 1
- If profile key OnlyIntegrateNew is true, add additional criteria where
- Orders.orderDate >= ‘StartIntegrationDate’ – 7 days
- Orders.orderDate <= ‘EndIntegrationDate’ or now if endIntegrationDate is none.
- Once we have the Databuild Order, see if it exists in po_order table where
- Po_order.s_jobNo = orders.job
- Po_order.s_costCentreCode = orders.costCentre
- Po_order.s_orderLoad = orders.bLoad
- And we check each Databuild Order Item, by seeing if it exists in po_item table where
- Po_item.l_link_item = bill.counter
- Orders and items are updated or added. At the end of integration items are checked to see if there are any that need to be removed from Framework.
- Get eligible Framework jobs from v_sched_dbJobOrders where
- Process Order Approvals
- If processApprovals is 1 or 3 then:
- If valid, then Framework p_orderAppr records are retrieved based on the approval type being processed (from preferences).
- If type is Approval 1:
- order.ok2Pay.date is d_payment1_appd
- If type is Approval 2:
- order.ok2Pay.date is d_payment2_appd
- If type is Latter of Approval 1 or Approval 2 then:
- order.ok2Pay.date is the latest date entered in either d_payment1_appd or d_payment2_appd where only 1 of those 2 dates has a value entered.
- If type is Latter of Approval 1 AND Approval 2 then:
- order.ok2Pay.date is the latest date entered in either d_payment1_appd or d_payment2_appd where both dates must have a value.
- Process Order Approvals