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

Install and configure

Describes how to configure Optimizely Graph for Commerce Connect

Optimizely Graph for Commerce Connect

Prerequisites

Get started

  1. Install Optimizely.Graph.Commerce from Optimizely Nuget package.
  2. Add the following code snippet to ConfigureServices method in Startup.cs:
    services.AddCommerceGraph();
  3. Add namespace.
    using Optimizely.Graph.Commerce;
  4. Add Optimizely setting as the same level as Episerver in appsetting.json.
    "Optimizely": {
      "ContentGraph": {
        "GatewayAddress": "https://cg.optimizely.com",
        "AppKey": "{your-app-key}",
        "Secret": "{your-secret}",
        "SingleKey": "{your-single-key}",
        "AllowSendingLog": "true"
      }
    }
  5. Build the solution.
  6. Prepare the database.
  7. Run the site. The first time the site is ran the site executes data migration and the homepage displays when done.
  8. Go to GraphQLAdmin to clear all previous synced data. Go to the Optimizely Graph content synchronization job to start syncing data. Go to GraphiQL to write queries to fetch data.