Setting up Workflow for A/B testing

Prerequisite - Sitecore Analytics should be set up correctly.

To verify - select any component in Experience editor and make sure you see this icon 

  1. A/B testing will be added as a step to a new or existing workflow. 
  2. Here I am going to Copy the existing "Sample Workflow" to create my own workflow and add A/B testing. 
  3. Workflow States - 
  4. Under Awaiting Approval add the following commands (/sitecore/templates/System/Workflow/Command) with the below fields -  

    Approve with Test -

    FieldValue
    Next StateWorkflows/AB testing Workflow/Approved
    Appearance Evaluator TypeSitecore.ContentTesting.Workflows.TestCandidatesCommandStateEvaluator, Sitecore.ContentTesting

    Approve without Test -

    FieldValue
    Next StateWorkflows/AB testing Workflow/Approved
    Appearance Evaluator TypeSitecore.ContentTesting.Workflows.TestCandidatesCommandNameEvaluator, Sitecore.ContentTesting

    Reject -

    FieldValue
    Next StateWorkflows/AB testing Workflow/Draft
    Appearance Evaluator Type
  5. Under Each command, add the following Actions -
    1. Approve with Test -
      1. Add action "Launch Create Test Dialog" with template  /sitecore/templates/System/Content Testing/Workflow/Launch Create Test Dialog Action.

        FieldValue
        Type string 
        Sitecore.ContentTesting.Workflows.LaunchCreateTestDialogAction, Sitecore.ContentTesting
        Create Suggested Tests If No Wizard
        Checked
    2. Approve without Test -
      1. Add action "Remove Tests Action" with template  /sitecore/templates/System/Content Testing/Workflow/Remove Tests Action.

        FieldValue
        Type string 
        Sitecore.ContentTesting.Workflows.RemoveTestsAction, Sitecore.ContentTesting
        Delete Test Definitionunchecked
    3. Reject has no action steps. 

Finally workflow looks like as under -