Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Common workflows

Describes common ways to use Optimizely Opal tools with Optimizely Commerce Connect.

The following workflows show how to use Optimizely Opal tools to create campaigns, clone promotions, and analyze performance in Optimizely Commerce Connect.

Create a campaign with promotions

  1. List available campaign types with the campaign_types_list tool.

  2. Create the campaign with the campaign_create tool.

    {
      "Name": "Holiday Sale 2024",
      "ValidFrom": "2024-12-01T00:00:00Z",
      "ValidUntil": "2024-12-31T23:59:59Z"
    }
  3. List available promotion types with the promotion_types_list tool.

  4. Create a promotion within the campaign with the promotion_create tool.

    {
      "Name": "25% Off All Items",
      "Campaign": "Holiday Sale 2024",
      "PromotionType": "EPiServer.Commerce.Marketing.Promotions.SpendAmountGetOrderDiscount"
    }
  5. Configure promotion properties with the promotion_dynamic_update tool.

    {
      "Id": "456",
      "Properties": {
        "Condition_SpendAmount": 50.00,
        "Discount_Percentage": 25.0
      }
    }

Clone and modify a promotion

  1. Find the source promotion with the promotion_filter tool.

    { "Name": "Summer Discount" }
  2. Get promotion details with the promotion_detail tool.

    { "Identifier": "456", "IncludeAdditionalDetails": true }
  3. Clone the promotion with the promotion_clone tool.

    { "PromotionId": "456", "CampaignId": "789" }
  4. Update the cloned promotion with the promotion_update tool.

    { "Id": "new-id", "Name": "Winter Discount" }

Analyze promotion performance

  1. List promotions by sales with the promotion_list_by_sales tool.

    { "MarketId": "US" }
  2. Get details of the top-performing promotion with the promotion_detail tool.

    { "Identifier": "top-promotion-id", "IncludeAdditionalDetails": true }