How to Create Interceptor in Pricefx
Prerequisites: Make sure you have the Develop Interceptors role assigned.
Steps to create an interceptor:
Go to Configuration > CRM Integration > Interceptors.
Click the Set Interceptor button which will display a modal window where you can create an interceptor.
Note that all interceptors have pfxInterceptor_ as a prefix which will be used when saving them as an Advanced Configuration record. You can also set the interceptor as temporary which means that the given interceptor will be activated only for your own browser session.
Interceptors are specific to each CRM configuration.
Example scenario:
Your app uses two CRM configurations: crm_config_account and crm_config_opportunity
You set up an Interceptor while the app is using crm_config_account
Result: The Interceptor will only work with crm_config_account
Important: crm_config_opportunity will not have this Interceptor and you need to set it seperatly for crm_config_opportunity.
In simpler terms, when you set up an Interceptor, it only applies to the specific CRM configuration you're currently using. Other CRM configurations in your app won't automatically get the same Interceptor.
How to Create Interceptor in IntelliJ
Prerequisites: Make sure you have the Develop Interceptors role assigned.
This method requires more steps and might be more difficult than creating an interceptor using pricefx, but provides more control while creating.
Steps to create an interceptor:
Check your version of Pricefx Studio in Plugins and update the version if necessary. If the plugin is missing, install Pricefx Studio first.
Edit the Config.js file to be able to fetch and deploy your solution to the correct environment.
Create in Advanced configuration new file and name it
pfxInterceptor_*.txt
(instead of * put name of interceptor).Edit Interceptor and Deploy it to partition.
Find and Fetch CRM config which will use interceptor, default value of the CRM config is
crm_config
.In CRM config find or add key
interceptor
, as a value should be interceptor name.After the code is deployed, use the Reload Interceptor functionality.
Optional. Open pricefx and check if in Administration > Configuration > CRM Integration > Interceptors interceptor is selected.