Internal to Citixsys Support Team
iVend 6.6
In some cases we require to generate replication events like product add/update events to match the product data between Enterprise and store.
N/A
Require to generate events with the help of Stored procedure.
Below are the steps.
1.Check the objectype on table Repobject Mapdb like if we want to generate product events we can check object id of invproduct table
2.Use stored procedure DataNotification for generating events like.
exec DataNotification @pSourceType=46, @pSourceKey=10000000000196117,@pBatchKey=0, @pOperationType=1,@pUserKey=1
Here @pSourceType :-Object type for which the data has been updated
@pSourceKey:- Reference key(Primary key) of the Source object
@pBatchKey :-Reference key of the transaction batch
@pOperationType:- Valid operation are: Add = 0, Update = 1
@pUserKey :-The user who has made the changes
3.If we want to generate events of multiple records then we can generate records of each record by below query.
Example:-Select 'exec DataNotification @pSourceType=46, @pSourceKey=''' + CONVERT(VARCHAR(100),productkey) + ''',@pBatchKey=''' + CONVERT(VARCHAR(100),NewID()) + ''', @pOperationType=1,@pUserKey=1'
from INVPRODUCT WITH (NOLOCK)
It will automatically generate batch no based on data.
4.Run output of query on sql it will generate events.
This article is created only for the Support team and will be done along with product experts.