This chapter describes the GL synchronization feature and how to configure this feature.
This chapter covers the following topics:
The GL synchronization feature allows for the automatic synchronization (copying) of data from a GL source data series to a sales_data target series. Synchronization is needed to support export of those series which previously had elements of multiple data tables, and to support some configure-to-order calculations. This functionality aggregates data across the gl dimension for each item, location, and sales date combination. The source series server definition determines which aggregation function is used: sum, average, min, max, etc. The aggregated data is then copied into the target sales_data series.
Make sure to apply the patch for the GL Synchronization feature
Configure the synch_series table with source series, target series and profile ids. The source series and target series columns contain values of the computed_name field of the computed_fields table. Information from the source series will be copied into target series.
The profile id column holds a number that is used to group series for synchronization. Determining which synchronization profiles can called is achieved by setting the SynchDefaultProfile system parameter. The following example shows how to configure the synch_series table:
SOURCE_SERIES (sales_data) |
TARGET_SERIES (GL or sales_data) |
PROFILE_ID (number) |
indirect_lift | indirect_lift_sd | 1 |
direct_lift | direct_lift_sd | 1 |
evt_cost | evt_cost_sd | 1 |
CTO_DEP_DEM_EXIST | dep_demand_exist_sd | 2 |
fcst_consensus | fcst_consensus_copy | 3 |
Note that in this example profile 1 copies series from promotion_data to sales_data, profile 2 copies series from cto_data to sales_data, and profile 3 copies series from sales_data to sales_data. It is possible for a profile’s source series to belong to different GL tables.
Run the procedure synch.update_synch_objects after updating the table synch_series. Executing this procedure is required to update objects used for synchronization. Make sure to rerun synch.update_synch_objects every time changes are made to the synch_series table.
No series may appear more than once in the TARGET_SERIES column. A series may appear multiple times in the SOURCE_SERIES column.
Note: It is recommended that the target series is marked as not editable in Business Modeler.
Synchronization may require a variety of activation points due to the many ways in which data can be modified in Demantra. Below is a partial list of touch points and recommendations on how to execute syncrhonization. Regardless of the touch pount, synchronization will run as a net change. Combinations which do not require synchronization will not have data copied to Sale_data.
Batch Synchronization
This will typically be called from a workflow which will include a step calling the procedure synch_run_batch.
Procdure will execute batch synchronization.
Calls to the procedure will have synatax synch.run_batch(profile_id, num_jobs)
The profile_id parameter controls which synchronization profiles are synched. This parameter is a comma-separated list. If no parameters are passed, the value in parameter SynchDefaultProfile will be used instead..
The num_jobs parameter determines how many parallel jobs are created for each GL that synchronized. The default is 4.
Batch synchronization will execute on all item location combinations for which the relevant data has changed since the last synchronization.
Worksheet Synchronization
This should be added for cases where worksheet updates should trigger a synchronization process.
Is disabled by setting SynchEnableAdHoc parameter to No
Adds the custom step com.demantra.workflow.step.SynchUpdateHook to end of the “update data” workflow
The worksheet hook will run GL Synchronization when combinations are updated using manual updates.
Synchronization profile will be based on SynchDefaultProfile parameter
Accept Simulation Synchronization
Is triggered when user Accepts Simulation
Runs a GL Synchronization on data that was changed as a result of simulation
Is disabled by setting SynchEnableAdHoc parameter to No
The synchronization profile is based on SynchDefaultProfile parameter
Level Method Synchronization
Is applied when executing a level method will necessitate synchronization of the information affected by the level member on which method is run.
Adds a procedure step to the workflow being executed by the method
Step follows other steps in workflow
Step executes the procedure synch.post_method_synch
Procedure is passed parameters (level_id, member_id, profile_id)
The parameters level_id, and member_id can be passed from the workflow using #level_id# and #member_id# notation.
The profile_id parameter determines which profiles the method will run on. If no value is specified, the sys_param SynchDefaultProfile will be used.
Delete Method Synchronization
Is applied when synchronization needs to run when members are deleted. If a GL member is deleted, that GL member’s population needs to be resynched to sales_data..
Adds a procedure step to run the procedure synch.pre_delete_synch before delete step
The procedure will have the following syntax pre_delete_sycnh( level_id, member_id, profile_id )
The parameters level_id, and member_id can be passed from the workflow using #level_id# and #member_id# notation.
The profile_id parameter determines which profiles the method will run on. If no value is specified, the sys_param SynchDefaultProfile will be used.
Edit Member Method Synchronization
Is applied when editing a level member should trigger synchronization. This solution incorporates the solutions used for Level Method Syncrhonization and Delete Method synchronization
Adds a procedure step to run the procedure synch.pre_delete_synch before delete step
The procedure will have the following syntax pre_delete_sycnh( level_id, member_id, profile_id )
Add procedure step to run the procedure synch.pre_delete_synch before delete step
The procedure will have the following syntax pre_delete_sycnh( level_id, member_id, profile_id )
The parameters level_id, and member_id can be passed from the workflow using #level_id# and #member_id# notation.
The profile_id parameter determines which profiles the method will run on. If no value is specified, the sys_param SynchDefaultProfile will be used.
Duplicate Promotion and Copy/Paste Synchronization
The synchronization of Duplicate Promotion and Copy/Paste will depend greatly on the levels and members for which this is executed. In cases where these processes require synchronization, custom configuration will be required.