Install and configure
3 min
Describes how to configure Optimizely Graph for Commerce Connect
Optimizely Graph for Commerce Connect
Prerequisites
Get started
- Install Optimizely.Graph.Commerce from Optimizely Nuget package.
- Add the following code snippet to ConfigureServices method in Startup.cs:
services.AddCommerceGraph();- Add namespace.
using Optimizely.Graph.Commerce;- 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"
}
}- Build the solution.
- Prepare the database.
- Run the site. The first time the site is ran the site executes data migration and the homepage displays when done.
- 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.