Create your first plugin

Version: 10.3

You can create your first Commerce Engine plugin using the Customer.Sample.Solution that is included as part of the Sitecore.Commerce.Engine.SDK.

Note

For information on the compatibility of Sitecore XC with browsers, operating systems, .NET frameworks, and database servers, see the Sitecore compatibility table.

To create your first plugin:

Note

Install and build the Customer.Sample.Solution before starting this procedure.

  1. To add your custom plugin to the Customer.Sample.Solution, go to \Sitecore.Commerce.Engine.SDK\src folder.

  2. Right-click and create a new folder for the plugin, for example MyPlugin.

  3. In Windows Powershell, go to the new folder you just created, and run the following command:

    RequestResponse
    dotnet new pluginsample -o <relative path to project directory>/<project name>
  4. Go to the folder where you created the new plugin and rename the Sitecore.Commerce.Plugin.Sample.csproj file to your project name.

    Note

    To resolve namespaces within the project, use a tool, such as Notepad++, to replace all references of Sitecore.Commerce.Plugin.Sample to your project name, for example Foundation.MyPlugin.Engine.

  5. To add this plugin to the sample solution, in Visual Studio, in the Solution Explorer, right-click the src folder and click Add Existing Project.

  6. In the Add Existing Project dialog box, go to the <MyPlugin> folder, click Sitecore.Commerce.Plugin.Sample.csproj file and click Open.

  7. In the Solution Explorer, right-click the Customer. Sample.Solution and click Build Solution.

Do you have some feedback for us?

If you have suggestions for improving this article,