Commerce runtime extensions

Completed

Commerce runtime (CRT) is a collection of portable .NET libraries that contain the core business logic for the commerce channel and pricing functionality. To add or modify business logic, you can customize CRT.

CRT service consists of a group of one or more requests and responses. POS sends a request to the Retail server (RS), which calls CRT to run the business logic. CRT processes the request and sends back the response.

CRT extension patterns

You can extend CRT for various scenarios by following the supported CRT extension patterns. The following CRT extensions are supported:

  • Create a new CRT service - Create a new functionality or feature.

  • Override existing service - You can override an existing functionality or customize it according to your business flow. Avoid overriding the handler. You can implement most of the CRT extension scenarios by using pre or post triggers. Overriding is required only when you want to completely replace the existing functionality.

  • Triggers - Run additional logic before or after any request.

Triggers

In the pre-trigger extension, you can do some validation, custom logic, and so on. In the post-trigger extension, you can add some custom information to the request and then send it to Store Commerce. Alternatively, you can modify the result that is returned from the standard functionality or create some additional business logic.

For example, CRT triggers give you a way to extend the CRT workflow and let you add business logic before and after every CRT request is implemented.

The following two methods are implemented in the trigger extension:

  • OnExecuting - This method is invoked before a request has been processed by a corresponding IRequestHandler implementation.

  • OnExecuted - This method is invoked after the request has been processed by a corresponding IRequestHandler implementation.

For more information, see Commerce runtime (CRT) and Retail Server extensibility.