Monday, February 6, 2023

How to write filter on Event based OIC integrations

 In earlier days we use to pass callback URL from export bulk data or import bulk data of ERP integration  web service.

Now Oracle has introduced Event based callback, where we can subscribe to business event raised in ERP cloud upon completion of import/export job.

There are diff ways we can subscribe to callback for import /export job 

1). Upon completion of FBDI Job - We can select the specific FBDI job here for which we need the callback

2). ERP Integration Inbound event - Generic event, needs filter to identify and restrict.

3). ERP Integration Outbound event - Generic event, needs filter to identify and restrict.

 

In this  post we will se point 2 and 3.

2). ERP Integration Inbound event - Generic event, needs filter to identify and restrict.

If we have subscribed to ERP Integration Inbound event,   this will get triggered for all the jobs which were submitted with event enabled in the job options.

So to restrict the triggering we can write filter on may be document name.

 


 

<xpathExpr xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared">contains ($eventPayload/ns0:JOBS/ns0:DOCUMENTNAME, "glImport")</xpathExpr>

 The above filter is for document name having "glImport" in name. So this will get riggered only for the fbdi files having "glImport" in the name.


3). ERP Integration Outbound event - Generic event, needs filter to identify and restrict.

 


 This is also a generic event , so if we want to restrict the trigger based on the job we have submitted we can write filter as below:

 

 

<xpathExpr xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared">$eventPayload/ns0:JOBS/ns0:JOBNAME="INT071G - ABC Transactions Outbound Integration from Oracle ERP to ABC system"</xpathExpr>  

Similarly we write filters on other fields in the callback payload or any other business event which we subscribe.