Module:Discounts Engine For Backend
Introduction
This module provides an engine that allows to execute the new discounts engine in the backend. Besides, it exposes a web service that makes use of this engine for calculating the applicable discounts for a given ticket.
![]() | This feature is available starting from 3.0PR19Q3. |
![]() | Due to performance problems, it is discouraged to make use of this module with JDK8. See here for more details. |
Discounts Web Service
The discounts web service provided with the module receives a ticket and returns the its applicable discounts taking into account the different discount rules defined in the Discounts and Promotions window.
The web service is exposed at the following url:
http(s)://<openbravo_url>/ws/org.openbravo.discounts.discount
Web Service API
To know the web service details like how to consume it together with the required request data and the output result, it is recommended to install the OpenAPI module which exposes the web service API definition.
See here to know how to deploy and visualize the discounts API.
After that it is possible to see the discounts web service details by navigating to the following url:
http(s)://<openbravo_url>/api
and selecting the "discounts" definition.
A live example is available here.