On this page:

05 JavaScript Mapper

JavaScript Mapper

Most of the logic involved in building a Policy Manager device integration goes in the JavaScript mapper file. The mapper file can be thought of as the midpoint between devices and Policy Manager.

This file must be a CommonJS module which exports an object implementing the following methods:

  1. import: Called to transform template output to Policy Manager entities.
  2. preRenderPolicy: Used to pre-process Policy Manager entities before providing them to the export template.
  3. buildConfigurationPatch: Takes the output of preRenderPolicy and the export template and constructs a configuration patch (setConfig payload) to be pushed to a device.

The mapper must be implemented as a CommonJS module using module.exports to export its functionality, and may not depend on other modules or files.