Discount engine as a web service (Enterprise)

The discount engine as an external web service makes it possible to standardize promotion calculation methods. This way, other e-commerce applications (ERP system, POS, e-Shop, etc.) can enjoy the benefits of the discount engine. The functionality of the discount engine is adapted to work as a separate web service and calculate discounts on sales document items in the same way regardless of the system.

The discount engine as a web service contains two major modules with dedicated services:

  • Synchronization service
  • Calculation service, including:
    • Discount module
    • Price module

The services can be installed via Comarch Auto Update. Two new components have been added to the Comarch Retail product to support the discount engine:

  • Discount Engine – Discount Service
  • Discount Engine – Synchronization Service

The components can only be installed for the parent agent on the main profile.

Components of Comarch Retail product

A separate database stores all the necessary information about discounts, prices, and objects required to calculate the cart value. This includes:

  • Discount definitions
  • Discount conditions
  • Customer groups and their relationships
  • Price types and price lists
  • Currencies and exchange rates

In order to run an application, such as an online store, with the discount engine as a web service integrated with Comarch ERP Enterprise, you need to perform several configuration steps:

  • Activate the Discount Engine function in the Customizing application
  • Create a sales channel with the adapter set as Discount Engine as Web Service
  • On the Discount Engine as Web Service tab in the Sales channels application, fill in the fields Timeout (s) for synchronization and Timebuffer (s) before synchronization
Note
The Timeout (s) for synchronization field determines the timeout used to send data in batch, while the Timebuffer (s) before synchronization specifies the delay buffer between data export and the earliest synchronization with the discount engine.
  • Assign the sales channel using the Discount Engine as Web Service adapter to a sales channel using the Cloud You can make the assignment in the Discount Engine assignments application.

Configuring the Discount Engine – Synchronization Service (DES) component

To configure the Discount Engine – Synchronization Service component, you need to fill in the following data:

  • Database – to configure database connection, enter the server name, new database name, and SQL user data. Next, select the [Test Connection] button.
  • Synchronization Configuration – to configure synchronization, enter the following data:
    • System – the ERP system to be integrated with the discount engine as a web service: Comarch ERP Enterprise
    • Code – the unique code of the sales channel using the Discount Engine as Web Service adapter
    • Host – the address of the discount engine service in Comarch ERP Enterprise
    • Port – the port of the discount engine service in Comarch ERP Enterprise
    • Database – the address of the Comarch ERP Enterprise database where the sales channel using the Discount Engine as Web Service adapter has been created, for instance PRESENTA630EN10
    • Certificate Name – the name of the Comarch ERP Enterprise user certificate
Configuring new component – Discount Engine – Synchronization Service

Configuring the Discount Engine – Discount Service component

To configure the Discount Engine – Discount Service component, you need to fill in the following data:

  • Database – to configure database connection, enter the server name, new database name, and SQL user data. Next, select the [Test Connection] button.
Configuring new component – Discount Engine – Discount Service

Czy ten artykuł był pomocny?