This content is archived. See latest version here

Last updated: May 25 2015

Workflows [BETA]

The promotion system can be run with the workflow system to calculate discounts and remove discounts. Updated workflow activities use the EPiServer.Commerce.Marketing.IPromotionEngine to make calculations and manipulate the cart.

To use the new promotion system in the workflows, a feature must be switched on. There are two ways to do this.

  • Update Configs\ecf.app.config
    XML
    <Application defaultApplicationName="ECApplication">
      <Roles>
        <add name="AdminRole" value="Admins" />
        <add name="ManagerUserRole" value="Management Users" />
        <add name="EveryoneRole" value="Everyone" />
        <add name="RegisteredRole" value="Registered" />
      </Roles>
      <Connection connectionStringName="EcfSqlConnection" />
      <Cache enabled="true" appTimeout="0:0:10" />
      <Languages>
        <add key="en-us" value="English" />
        <add key="da-DK" value="Danish" />
        <add key="sv-SE" value="Svenska" />
        <add key="fi-FI" value="Suomi" />
        <add key="nl-NL" value="Netherlands" />
        <add key="nb-NO" value="Norsk" />
        <add key="fr-FR" value="French" />
      </Languages>
      <Features>
        <add feature="WorkflowsVNext" state="Enabled" type="Mediachase.Commerce.Core.Features.WorkflowsVNext, Mediachase.Commerce" />
      </Features>
    </Application>
    
  • Use the Servicelocator
    C#
    var featureSwitch = ServiceLocator.Current.GetInstance<IFeatureSwitch>();
    featureSwitch.Features.Add(new WorkflowsVNext());
    featureSwitch.EnableFeature(WorkflowsVNext. FeatureWorkflowsVNext);
    

Do you have feedback on this documentation? Send an email to documentation@episerver.com. For development-related questions and discussions, refer to our Forums on https://world.episerver.com/forum/