Reporting Deleted Product References with a Generic XML OIEP

Outbound integration endpoints (OIEPs) can pass deletion events for product references when the OIEP is configured to listen for modify events on the relevant objects. The Modify Event Type is necessary since the object itself is not being deleted, but rather a reference on the object which continues to exist.

Product

On product 120223, the Reference Type of CrossReference to Target 7859 must be deleted in order to trigger the OIEP.

Object Type and Event Type Selection

On the OIEP, open the Configuration tab. Under the Output Templates section, click the Add configuration link.

Set the Object Types and Event Types.

Template

In the Output Template, click the ellipsis button (), and set the format to Generic XML.

Provide the following text in the Sample field.

Copy
<Products>
   <Product ID="[?Target ID?]">
   <?Record?>
   <Name><?Target?></Name>
   <CrossRefs>
      <CrossRef refTypeID="[?Target refId?]" DeletedStatus="[?Target DeletedStatus?]">
      <?MultiTarget?>
      <IDTarget><?Target?></IDTarget>
      </CrossRef>
   </CrossRefs>
   </Product>
</Products>    

Mapping

The Constant Value 'CrossReference' is used to identify the type of reference being monitored. The <Is deleted> aspect monitors for deletions. Data Path mapping to the Target reference provides the deleted ID.

For detailed mapping steps, refer to the Mapping to Report Deleted Product References with Generic XML OIEP documentation here.

Results

When the Product Reference for item 7859 is deleted and the product 120223 is approved, the OIEP is triggered. Invoking the OIEP generates the following file:

Note: Both of the product references originally on the product are exported. The DeletedStatus target shows blank for the reference that still exists, and shows "IsDeleted" for the removed reference.