Removing deleted child records via integration

In the scenario where a single order line is deleted in the ERP after the record previously existed in Optimizely B2B Commerce, a Job Definition Step can be added to allow for the deletion of child entries upon the refresh of the parent record. Refreshing the order history is the primary scenario where this would be used.

The Job Definition Step will delete all of the order lines associated with the order header records received in the order header refresh step. The assumption is that the subsequent step (order history line refresh) will then repopulate B2B Commerce with the remaining order lines from the ERP.

Integration_Job_Delete_Child_Diagram.png

Add the delete children job definition step

  1. Use the following steps to incorporate the "Delete Children" Job Definition Step into an Integration Job.
  2. Go to Admin Console > Administration > Jobs > Job Definitions
  3. Either Edit an existing Job Definition or Create a new Job Definition
  4. Within in the Details finger tab, under the Delete Behavior section, change the Delete Children toggle to show YES.

The option to delete children is only presented for target objects that have children.