Rules
Change the product's behavior in your approval or production environment, without the need to deploy the system again. The customized service can be implemented in any programming language, as long as it complies with the endpoint contracts provided by a service and uses one of the available protocols: SOAP 1.1 or REST/JSON, both HTTP.
Endpoint contracts are available in the graphical interface itself, where it is possible to configure extensions that point to customized services. Customizations are made through extensions, with three types of extensions being allowed on the platform: functionality, rule point and webhook.
There are three possible operating methods for customizations:
- Before: the customized service will receive the request before reaching the destination service and must change the request input data, as desired, and return the changed data;
- After: the customized service will receive the response from the original target service and must change the result, as desired, and return the changed data;
- Intercept: the request will be forwarded to the custom service that is responsible for processing the input data and providing the appropriate output data. It is important that this method is used with care, as its use may violate existing business rules or even cause the flow of other services to stop working properly.
Types of Headers
- Tenant: tenant information in the call;
- User: user who is using the service. This information can be useful for restrictions and auditing, for example;
- Timeout: responsible for informing the service's efficient response time. Can be used to configure error messages if the response takes a long time to occur;
- Token: current user authorization token. Allows other API calls to be made with this user in custom code;
- Custom: allows the customizer to pass headers with fixed values to the rule.
Statistics
Track the execution details of customizations made to APIs or rule points. A panel will open that contains the data transmitted, the period, the total number of customized requests, the execution duration, as well as the number of successful requests, with an internal error, for example 500, and with a call error, such as 400. Go to Technology > Customization > Rules > Rule points or Features (API), select the desired primitive and clickActions >Details.
What do you need to do:
Important
Adequately control the volume of customizations carried out in APIs and Rule Points through the information displayed on the screen: amount of data transmitted, customized requests that were used, time spent on customizations and quota limit. If any of these limits are reached, a warning message will be displayed. To expand limits, contact Senior.
The discontinued primitives (deprecated) cannot be customized. If the discontinued primitive has expired its removal period, that primitive will not appear in the list.