Map Dependent Fields

Some fields, such as Plant, require mapping in MongoDB to ensure correct alignment between SAP data and iMaintenance. This step uses the seed mapping script to establish those dependencies.This topic explains how to map dependent fields, such as Plant, in MongoDB by running the seed mapping script located at RACE/backend/SapInbound/src/integration-v2/startSeed.js. It also outlines final steps, including stopping the SAP Inbound container and updating the Integrations collection in MongoDB Atlas when switching SAP environments.

To map dependent fields:
  1. Run Seed Mapping Script
    • File Path: RACE/backend/SapInbound/src/integration-v2/startSeed.js

    • node startSeed.js

      This maps dependent fields (e.g., Plant) correctly in MongoDB.

  2. Finalize Mapping
    • Stop the SAP Inbound microservice after the script completes.

    • If switching SAP environments, update the Integrations collection in MongoDB Atlas to reflect the new environment.