How to Add New Interceptor Template and Update Documentation

To add a new template, you need to have read and write access in the pricefx-clients-js repository.

How to Add a New Template

  1. In pricefx-clients-js access the folder packages/pricefx-modules/src/app/context/crmIntegration/dynamicInterceptors/templates.

  2. The file names represent the interceptor methods. To add a new template, select the interceptor method where you wish to add it and put your template there.

    1. If you did not find the template file for the interceptor method, you need to create a new file and put it in the file called packages/pricefx-modules/src/app/context/crmIntegration/dynamicInterceptors/templates/index.ts.

    2. Push changes into the branch and merge it.

How to Update Documentation

After you make any changes in interceptors, the documentation is not updated automatically. To update the documentation at https://api.pricefx.com/, you have to:

  1. Open the Pricefx Unity app.

  2. In the web browser console, write window.generateDoc = true; and press Enter.

  3. In Unity, go to the page #/administration/configuration/crm-integration/interceptors.

  4. You should have the content for documentation in the browser console. Copy it.

  5. Paste the content into the file packages/pricefx-modules/src/app/context/crmIntegration/dynamicInterceptors/interceptorMethodNames.ts.

  6. Push changes into the branch and merge it.

Found an issue in documentation? Write to us.