# VWO

> Create, rename and start or stop VWO campaigns, manage their goals and labels, read variations and the activity timeline, turn feature flags on or off, and follow new campaigns and status changes.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/vwo

## Actions

### Add labels to campaign

Label a campaign with existing labels, new ones, or both.

**Inputs**

- Campaign (`campaign_id`, number, required): The campaign. At least 1.
- Labels (`label_ids`, list): Existing labels to add.
- New labels (`new_labels`, list): Names of new labels to create and add.

**Outputs**

- `data` (list): The response from VWO.

**Example output**

```json
{
  "data": [
    {
      "id": 1,
      "name": "example"
    }
  ]
}
```

### Change campaign status

Start, pause, stop, trash or restore campaigns.

**Inputs**

- Campaigns (`campaign_ids`, list, required): The campaigns to change.
- Change to (`status`, text, required): What to do with them. One of: `RUNNING` (Start or resume), `PAUSED` (Pause), `STOPPED` (Stop), `TRASHED` (Move to trash), `RESTORED` (Restore from trash).

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {
    "ids": [
      1
    ],
    "status": "example"
  }
}
```

### Create campaign

Create a campaign on a page with one goal. It starts as not started; add variations in VWO's editor and start it with Change campaign status.

**Inputs**

- Type (`type`, text): The kind of campaign. Leave empty for an A/B test. One of: `ab` (A/B test), `split` (Split URL test), `multivariate` (Multivariate test), `heatmap`, `conversion` (Conversion tracking).
- Page URL (`url`, text, required): The page the campaign runs on, such as https://example.com/pricing.
- Goal name (`goal_name`, text, required): The name of the campaign's goal, such as Visited checkout.
- Goal type (`goal_type`, text): What counts as a conversion. Leave empty for visiting a page. One of: `visitPage` (Visits a page), `engagement` (Engages with a page), `formSubmit` (Submits a form), `clickLink` (Clicks a link), `clickElement` (Clicks an element), `revenue` (Tracks revenue), `custom-conversion` (Custom conversion).
- Goal URL (`goal_url`, text): The page the goal is tracked on. Leave empty for the campaign's page.
- URL match (`url_match`, text): How the goal's URL is matched. Leave empty for an exact match. One of: `url` (Is exactly), `startsWith` (Starts with), `endsWith` (Ends with), `contains`, `pattern` (Matches a wildcard pattern), `regex` (Matches a regular expression).

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {
    "goals": [
      {
        "id": 1,
        "name": "example"
      }
    ],
    "id": 1,
    "status": "example"
  }
}
```

### Create goal

Add a goal to a campaign, such as a page visit, a form submission or a click.

**Inputs**

- Campaign (`campaign_id`, number, required): The campaign. At least 1.
- Name (`name`, text, required): The goal's name.
- Type (`type`, text, required): What counts as a conversion. One of: `visitPage` (Visits a page), `engagement` (Engages with a page), `formSubmit` (Submits a form), `clickLink` (Clicks a link), `clickElement` (Clicks an element), `revenue` (Tracks revenue), `custom-conversion` (Custom conversion).
- URL (`url`, text): The page the goal is tracked on. Needed for every type except engaging with a page and clicking an element.
- URL match (`url_match`, text): How the goal's URL is matched. Leave empty for an exact match. One of: `url` (Is exactly), `startsWith` (Starts with), `endsWith` (Ends with), `contains`, `pattern` (Matches a wildcard pattern), `regex` (Matches a regular expression).
- CSS selector (`css_selector`, text): For clicks an element: the element's CSS selector, such as #buy-now.

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {
    "excludedUrls": [
      {
        "type": "example",
        "value": "example"
      }
    ],
    "id": 1,
    "isCreatedInEditor": true,
    "isPrimary": true,
    "name": "example",
    "type": "example",
    "urls": [
      {
        "type": "example",
        "value": "example"
      }
    ]
  }
}
```

### Delete goal

Remove a goal from a campaign.

**Inputs**

- Campaign (`campaign_id`, number, required): The campaign. At least 1.
- Goal (`goal_id`, number, required): The goal. At least 1.

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {}
}
```

### Get campaign

Get a campaign with its URLs, variations, goals, traffic and status.

**Inputs**

- Campaign (`campaign_id`, number, required): The campaign. At least 1.

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {
    "createdBy": {
      "id": 1,
      "name": "example"
    },
    "createdOn": 1,
    "device": "example",
    "excludedUrls": [
      {
        "type": "example",
        "value": "example"
      }
    ],
    "goals": [
      {
        "excludedUrls": [
          {
            "type": "example",
            "value": "example"
          }
        ],
        "id": 1,
        "isCreatedInEditor": true,
        "isPrimary": true,
        "name": "example",
        "type": "example",
        "urls": [
          {
            "type": "example",
            "value": "example"
          }
        ]
      }
    ],
    "id": 1,
    "labels": [
      {
        "id": 1,
        "name": "example"
      }
    ],
    "name": "example",
    "percentTraffic": 1,
    "primaryUrl": "example",
    "status": "example",
    "thresholds": {
      "losingPercent": 1,
      "visitors": 1,
      "winningPercent": 1
    },
    "type": "example",
    "urls": [
      {
        "type": "example",
        "value": "example"
      }
    ],
    "variations": [
      {
        "id": 1,
        "isControl": true,
        "isDisabled": true,
        "name": "example",
        "percentSplit": 1,
        "screenshots": {
          "quick": "example"
        },
        "sectionId": 1
      }
    ]
  }
}
```

### Get campaign share link

Get a link that shows a campaign's report to people without a VWO login.

**Inputs**

- Campaign (`campaign_id`, number, required): The campaign. At least 1.

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {
    "shareLink": "example"
  }
}
```

### Get feature flag

Get a feature flag's key, type, variables, variations and rule count.

**Inputs**

- Feature flag (`feature_flag`, text, required): The feature flag.

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {
    "description": "example",
    "featureKey": "example",
    "featureType": "example",
    "id": 1,
    "name": "example",
    "rulesCount": 1,
    "variables": [
      {}
    ],
    "variations": [
      {}
    ]
  }
}
```

### Get goal

Get a campaign goal's name, type and URLs.

**Inputs**

- Campaign (`campaign_id`, number, required): The campaign. At least 1.
- Goal (`goal_id`, number, required): The goal. At least 1.

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {
    "excludedUrls": [
      {
        "type": "example",
        "value": "example"
      }
    ],
    "id": 1,
    "isCreatedInEditor": true,
    "isPrimary": true,
    "name": "example",
    "type": "example",
    "urls": [
      {
        "type": "example",
        "value": "example"
      }
    ]
  }
}
```

### Get variation

Get a campaign variation's name, traffic split and screenshot.

**Inputs**

- Campaign (`campaign_id`, number, required): The campaign. At least 1.
- Variation (`variation_id`, text, required): The variation. For a multivariate campaign, the section ID and variation ID with a comma, such as 1,2.

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {
    "id": 1,
    "isControl": true,
    "isDisabled": true,
    "name": "example",
    "percentSplit": 1,
    "screenshots": {
      "quick": "example"
    },
    "sectionId": 1
  }
}
```

### Get website

Get a website's domain, platform and status.

**Inputs**

- Website (`website_id`, number, required): The website. At least 1.

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {
    "accountId": 1,
    "createdAt": 1,
    "domain": "example",
    "id": 1,
    "isArchived": true,
    "isRegistered": true,
    "lastUpdatedAt": 1,
    "name": "example",
    "platform": "example",
    "status": "example"
  }
}
```

### Get workspace

Get the connected workspace's name, time zone and company details.

**Inputs**: None.

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {
    "company": {
      "name": "example",
      "size": "example",
      "website": "example"
    },
    "createdOn": 1,
    "enabled": true,
    "id": 1,
    "name": "example",
    "timezone": "example"
  }
}
```

### List activity

List the workspace's timeline: campaigns created, started, paused and changed, newest first, with who did it.

**Inputs**

- From (`start_time`, date and time): Only activity at or after this time.
- To (`end_time`, date and time): Only activity at or before this time.
- Entries to return (`limit`, number): How many entries to return, up to 100. Leave empty for 100. From 1 to 100.
- Entries to skip (`offset`, number): How many entries to skip, for reading the next page. At least 0.

**Outputs**

- `data` (list): The response from VWO.

**Example output**

```json
{
  "data": [
    {
      "campaign": {
        "id": 1,
        "name": "example",
        "platform": "example",
        "type": "example"
      },
      "id": 1,
      "type": "example",
      "what": "example",
      "when": "example",
      "who": {
        "name": "example"
      }
    }
  ]
}
```

### List campaigns

List the workspace's campaigns (tests, heatmaps, surveys and more), optionally of one type, platform or label.

**Inputs**

- Type (`type`, text): Only campaigns of this type. One of: `ab` (A/B test), `multivariate` (Multivariate test), `split` (Split URL test), `targeting` (Personalization), `heatmap`, `conversion` (Conversion tracking), `usability`, `survey`, `analysis`, `analyze-heatmap` (Insights heatmap), and 7 more.
- Platform (`platform`, text): Only campaigns on this platform. One of: `website`, `full-stack` (Full stack), `mobile-app` (Mobile app).
- Labels (`labels`, list): Only campaigns with these labels.
- Include details (`show_detailed_info`, true/false): Also return each campaign's segmentation, schedules, variations and notes.
- Records to return (`limit`, number): How many records to return. Leave empty for VWO's default. At least 1.
- Records to skip (`offset`, number): How many records to skip, for reading the next page. At least 0.

**Outputs**

- `data` (list): The response from VWO.

**Example output**

```json
{
  "data": [
    {
      "createdBy": {
        "id": 1,
        "name": "example"
      },
      "createdOn": 1,
      "id": 1,
      "isDeleted": true,
      "labels": [
        {
          "id": 1,
          "name": "example"
        }
      ],
      "name": "example",
      "platform": "example",
      "primaryUrl": "example",
      "status": "example",
      "type": "example",
      "urls": [
        {
          "type": "example",
          "value": "example"
        }
      ]
    }
  ]
}
```

### List feature flags

List the workspace's feature flags (VWO Feature Experimentation).

**Inputs**

- Records to return (`limit`, number): How many records to return. Leave empty for VWO's default. At least 1.
- Records to skip (`offset`, number): How many records to skip, for reading the next page. At least 0.

**Outputs**

- `data` (list): The response from VWO.

**Example output**

```json
{
  "data": [
    {
      "description": "example",
      "featureKey": "example",
      "featureType": "example",
      "id": 1,
      "name": "example",
      "rulesCount": 1,
      "variables": [
        {}
      ],
      "variations": [
        {}
      ]
    }
  ]
}
```

### List goals

List a campaign's goals, the conversions it measures.

**Inputs**

- Campaign (`campaign_id`, number, required): The campaign. At least 1.

**Outputs**

- `data` (list): The response from VWO.

**Example output**

```json
{
  "data": [
    {
      "excludedUrls": [
        {
          "type": "example",
          "value": "example"
        }
      ],
      "id": 1,
      "isCreatedInEditor": true,
      "isPrimary": true,
      "name": "example",
      "type": "example",
      "urls": [
        {
          "type": "example",
          "value": "example"
        }
      ]
    }
  ]
}
```

### List labels

List the labels the workspace uses to organize campaigns.

**Inputs**: None.

**Outputs**

- `data` (list): The response from VWO.

**Example output**

```json
{
  "data": [
    {
      "id": 1,
      "name": "example"
    }
  ]
}
```

### List users

List the workspace's users with their permission level.

**Inputs**: None.

**Outputs**

- `data` (list): The response from VWO.

**Example output**

```json
{
  "data": [
    {
      "account": 1,
      "country": "example",
      "createdOn": 1,
      "department": "example",
      "email": "example",
      "id": 1,
      "name": "example",
      "permission": "example",
      "title": "example"
    }
  ]
}
```

### List variations

List a campaign's variations with their traffic split.

**Inputs**

- Campaign (`campaign_id`, number, required): The campaign. At least 1.

**Outputs**

- `data` (list): The response from VWO.

**Example output**

```json
{
  "data": [
    {
      "id": 1,
      "isControl": true,
      "isDisabled": true,
      "name": "example",
      "percentSplit": 1,
      "screenshots": {
        "quick": "example"
      },
      "sectionId": 1
    }
  ]
}
```

### List websites

List the websites set up in the workspace and whether VWO's code is found on each.

**Inputs**: None.

**Outputs**

- `data` (list): The response from VWO.

**Example output**

```json
{
  "data": [
    {
      "accountId": 1,
      "createdAt": 1,
      "domain": "example",
      "id": 1,
      "isArchived": true,
      "isRegistered": true,
      "lastUpdatedAt": 1,
      "name": "example",
      "platform": "example",
      "status": "example"
    }
  ]
}
```

### List workspaces

List the account's other workspaces (sub-accounts).

**Inputs**

- Include this workspace (`include_current`, true/false): Also list the workspace the token belongs to.
- Status (`status`, text): Only active or only disabled workspaces. Leave empty for all. One of: `all`, `active`, `disabled`.

**Outputs**

- `data` (list): The response from VWO.

**Example output**

```json
{
  "data": [
    {
      "company": {
        "name": "example",
        "size": "example",
        "website": "example"
      },
      "createdOn": 1,
      "enabled": true,
      "id": 1,
      "name": "example",
      "timezone": "example"
    }
  ]
}
```

### Remove label from campaign

Take a label off a campaign. The label stays in the workspace.

**Inputs**

- Campaign (`campaign_id`, number, required): The campaign. At least 1.
- Label (`label_id`, number, required): The label to remove. At least 1.

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {}
}
```

### Rename campaign

Change a campaign's name.

**Inputs**

- Campaign (`campaign_id`, number, required): The campaign. At least 1.
- Name (`name`, text, required): The campaign's new name.

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {
    "createdBy": {
      "id": 1,
      "name": "example"
    },
    "createdOn": 1,
    "device": "example",
    "excludedUrls": [
      {
        "type": "example",
        "value": "example"
      }
    ],
    "goals": [
      {
        "excludedUrls": [
          {
            "type": "example",
            "value": "example"
          }
        ],
        "id": 1,
        "isCreatedInEditor": true,
        "isPrimary": true,
        "name": "example",
        "type": "example",
        "urls": [
          {
            "type": "example",
            "value": "example"
          }
        ]
      }
    ],
    "id": 1,
    "labels": [
      {
        "id": 1,
        "name": "example"
      }
    ],
    "name": "example",
    "percentTraffic": 1,
    "primaryUrl": "example",
    "status": "example",
    "thresholds": {
      "losingPercent": 1,
      "visitors": 1,
      "winningPercent": 1
    },
    "type": "example",
    "urls": [
      {
        "type": "example",
        "value": "example"
      }
    ],
    "variations": [
      {
        "id": 1,
        "isControl": true,
        "isDisabled": true,
        "name": "example",
        "percentSplit": 1,
        "screenshots": {
          "quick": "example"
        },
        "sectionId": 1
      }
    ]
  }
}
```

### Rename goal

Change a campaign goal's name.

**Inputs**

- Campaign (`campaign_id`, number, required): The campaign. At least 1.
- Goal (`goal_id`, number, required): The goal. At least 1.
- Name (`name`, text, required): The goal's new name.

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {
    "excludedUrls": [
      {
        "type": "example",
        "value": "example"
      }
    ],
    "id": 1,
    "isCreatedInEditor": true,
    "isPrimary": true,
    "name": "example",
    "type": "example",
    "urls": [
      {
        "type": "example",
        "value": "example"
      }
    ]
  }
}
```

### Turn feature flag on or off

Turn a feature flag on or off in one environment.

**Inputs**

- Feature flag (`feature_flag`, text, required): The feature flag.
- Environment (`environment`, text, required): The environment's key or ID, such as production, from the flag's page in VWO.
- On (`is_enabled`, true/false, required): On to turn the flag on in the environment, off to turn it off.

**Outputs**

- `data` (object): The response from VWO.

**Example output**

```json
{
  "data": {}
}
```
