Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. In Configuration > Interceptors you will see all available intercepted methods. Each method refers to an event in Pricefx Interceptor Methods. Some of these events are:

    • quotesDetailNewCheck
      This method is triggered after clicking the New button at /#/qc/quotes, but before the Quote is created. If this method returns false, the Quote will not be created and the user will stay at the Quote list. In this method you do not have access to quoteAPI, but you can use other APIs for checking conditions from CRMs.

    • quotesDetailNew
      The starting point for this event is clicking the New button at /#/qc/quotes. The method is triggered after the new Quote is recalculated and saved at backend and the user is redirected to the Quote detail page /#/qc/quotes/<quoteId>.

    • quotesDetailEdit
      Triggered when a user opens the Quote detail page.

    • quotesDetailRecalculate
      Triggered when a user clicks the Recalculate button on the Quote detail page /#/qc/quotes/<quoteId>.

    • quotesDetailSubmit
      Triggered when a user clicks the OK button in the Submit modal dialog on the Quote detail page /#/qc/quotes/<quoteId> after clicking Submit.

    • quotesDetailTabSwitch
      Triggered at Quote detail at open and then when the user switches to a different tab.

      To see a regularly updated list of all available methods and when they are triggered, visit https://pricefx.atlassian.net/wiki/pages/resumedraft.action?draftId=5498142782&draftShareId=a0c6836b-3f65-4dad-8bd3-209c2b96d8aa interceptor Method Names.

  2. As you expand one of the method fields, you will see Add PRE Code, and/or Add POST Code buttons (according to each method’s compatibility):


    When clicking any of them, a modal window will show:

    image-20241002-121106.png


    There is a dropdown menu with available templates, and you can also paste your JavaScript code in there.

  3. Reload the interceptor every time after modifying the interceptor to apply changes.

  4. Finally, you can test the interceptor's functionality, in this case by creating a new quote:

...