Commerce Development Quick Tips

Sitecore Commerce Roles – Functions and Considerations

Sitecore Commerce is built against Microsoft. NetCore and its service-oriented architecture allow you the flexibility to host services across several roles, each serves different aspect of the overall Commerce platform.

The service roles allow flexible service hosting, with each role having different deployment configurations and management policies. Let’s look at different roles Sitecore Commerce offers and how you can use roles effect to provide scalable solution and infrastructure for your clients.

Before we begin – let me call out, roles provide the logical separation of the code and most of the times same code is deployed on all the roles but the behaviour of each of the role can be independently controlled using policies. More about that later.

When you install Sitecore Commerce following 4 roles are created in IIS, let have a look at each one of them

DevOps role

This role is not accessible to the outside world and is only available to the DevOps team or the people with privilege access. This role is used for housekeeping activities like environment bootstrap, environment management, manual cache management, managing OOTB minions (search, orders, etc) and policies etc.

You can look at all the operations provided by Sitecore in the postman scripts comes with the installation package. If you are a developer, you can use this role to look at currently running pipelines to find where a new plugin you are creating needs to be injected.

Key takeaways

  1. Never expose this role publicly including the functionality to bootstrap or policy management. Host this role on the separate server.
  2. Use this role to get the currently running pipelines to determine where to inject your custom code.

Typical usage

  1. Manage one or more environments
  2. Manage policies and policy sets
  3. Manage global artifacts

 Shops role

Extensively used role of the platform which handles traffic from storefronts (CD).

As I mentioned earlier – the behaviour of the roles can be managed by the policies, one example of this is the caching policy. Since this role serves the front-end websites, it is heavily cached.

While designing your physical infrastructure, you can benefit from having multiple instances of this role to cater to your traffic.

Key takeaways

  • Serves the front-end websites
  • Heavily cached.
  • Make use of vertical and horizontal scaling to cater to changes in website traffic.

Typical usage

  • Shopping cart services
  • Order Services etc.

Authoring role

In simple terms, this role is used to provide all the functionalities offered by business tools.

Merchandisers use this to manage products, commerce marketers use to manage promotions, and CSR uses it to manage customers and orders.

Due to the real-time nature of this role consider having no or little caching on this role.

Minions

This one is my favourite – works behind the scenes without bothering anyone ?. This role is an asynchronous task runner to run schedule jobs like processing orders, perform clean-ups, index management etc.

Consider extending this role to provide similar services. An example of this is – If you have an order which has customisation entity associated with it. You can extend pending order minion to add a new bock to read this entity and send these orders to customisation services. Similarly, you can use minion roles to provide subscription management services.

Key Takeaways

  • Runs asynchronously, independently, behind the scene
  • Used for repetitive tasks
  • Like Order Processing

Typical usage

  • Post order management
  • External integrations
  • Subscription management
  • Clean-up, indexing etc.

That is it. I hope this post gave you a high-level overview of different Commerce roles.

We are experts in Sitecore Commerce and help you with the implementation. Know more about our Sitecore services here.

Did you find this useful? If so, please share with your connections.

Leave a Reply

Your email address will not be published. Required fields are marked *