# AB Tasty

> Follow and control your AB Tasty campaigns: list and read tests and personalizations, their variations, modifications, analytics links and tracked events, play or pause them, manage the account's users, and update or clear the AB Tasty script.

App · 19 actions. Web page: https://docs.lodol.com/docs/integrations/ab-tasty

## Actions

### Add user

Give someone access to the account with a role. AB Tasty invites them by email if they don't have an AB Tasty login yet.

**Inputs**

- Email (`email`, text, required): The person's email address.
- Role (`role`, text, required): What the user may do in AB Tasty: view reports, work on campaigns, create them, or run the account. One of: `viewer`, `user`, `creator`, `admin`.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "user": {
        "connection_count": 1,
        "creation_date": "example",
        "email": "example",
        "firstname": "example",
        "id": 1,
        "last_login_time": "example",
        "lastname": "example",
        "mfa_enabled": true
      }
    },
    "id": 1,
    "role": "example"
  }
}
```

### Change campaign status

Play, pause, end, archive or otherwise move a campaign to a new status, then return the campaign. AB Tasty refuses moves it doesn't allow, such as pausing a draft.

**Inputs**

- Campaign (`test_id`, number, required): The campaign. At least 1.
- Status (`status`, text, required): The campaign's new status. One of: `play` (Play (running)), `pause`, `draft`, `ready_to_launch` (Ready to launch), `in_qa` (In QA), `analysis`, `ended`, `archive`.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "active": true,
    "audience_id": "example",
    "creation_date": "example",
    "creator_id": 1,
    "description": "example",
    "id": 1,
    "labels": [
      "example"
    ],
    "last_pause_timestamp": 1,
    "last_play_timestamp": 1,
    "name": "example",
    "preprod": true,
    "report_token": "example",
    "start_datetime": 1,
    "start_stop_timezone": "example",
    "state": "example",
    "stop_datetime": 1,
    "test_visitor_count": 1,
    "traffic": 1,
    "tunnel_parent": 1,
    "type": "example",
    "url": "example",
    "visitors_count": 1
  }
}
```

### Change user role

Change what a user may do in the account, then return the user.

**Inputs**

- User (`membership_id`, number, required): The user, as a member of this account. At least 1.
- Role (`role`, text, required): What the user may do in AB Tasty: view reports, work on campaigns, create them, or run the account. One of: `viewer`, `user`, `creator`, `admin`.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "user": {
        "connection_count": 1,
        "creation_date": "example",
        "email": "example",
        "firstname": "example",
        "id": 1,
        "last_login_time": "example",
        "lastname": "example",
        "mfa_enabled": true
      }
    },
    "id": 1,
    "role": "example"
  }
}
```

### Clear AB Tasty script

Empty the AB Tasty script in an emergency, so no campaign shows on your website until the script is next updated (by playing or pausing a campaign, or the Update AB Tasty script step).

**Inputs**: None.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "cleared": true
  }
}
```

### Get AB Tasty script checksums

Get the checksums of the last 10 versions of the AB Tasty script, to check the file your site loads (SHA-512, Base64).

**Inputs**: None.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "checksum_files": [
      {
        "created_at": {
          "pattern": "example",
          "readable_date": "example",
          "timestamp": 1
        },
        "hash": "example",
        "id": 1,
        "size": 1
      }
    ]
  }
}
```

### Get account statistics

Get the account's campaign counts by type (running and paused), its number of users, and campaigns created, started and played each month with their visitors.

**Inputs**: None.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "campaign_states": {},
    "count_collaborators": 1,
    "count_collaborators_connections": 1,
    "created_experiments": [
      {
        "avg_visitors": "example",
        "count_tests": "example",
        "count_visitors": "example",
        "month_year": "example"
      }
    ],
    "played_experiments": [
      {
        "count_tests": "example",
        "count_visitors": "example",
        "month_year": "example"
      }
    ],
    "started_experiments": [
      {
        "count_tests": "example",
        "count_visitors": "example",
        "month_year": "example"
      }
    ]
  }
}
```

### Get analytics tool link

Get one of the tools a campaign sends its data to.

**Inputs**

- Campaign (`test_id`, number, required): The campaign. At least 1.
- Tool link (`tool_link_id`, number, required): The analytics tool link. At least 1.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "custom_tracker": "example",
    "from_account": 1,
    "id": 1,
    "name": "example",
    "value": "example"
  }
}
```

### Get campaign

Get a campaign: its type, status, traffic, URL, schedule, visitors and labels.

**Inputs**

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

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "active": true,
    "audience_id": "example",
    "creation_date": "example",
    "creator_id": 1,
    "description": "example",
    "id": 1,
    "labels": [
      "example"
    ],
    "last_pause_timestamp": 1,
    "last_play_timestamp": 1,
    "name": "example",
    "preprod": true,
    "report_token": "example",
    "start_datetime": 1,
    "start_stop_timezone": "example",
    "state": "example",
    "stop_datetime": 1,
    "test_visitor_count": 1,
    "traffic": 1,
    "tunnel_parent": 1,
    "type": "example",
    "url": "example",
    "visitors_count": 1
  }
}
```

### Get modification

Get one change a variation makes to the page.

**Inputs**

- Campaign (`test_id`, number, required): The campaign. At least 1.
- Variation (`variation_id`, number, required): The variation of the campaign. The original version is 0. At least 0.
- Modification (`modification_id`, number, required): The modification. At least 1.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "id": 1,
    "name": "example",
    "recursive": "example",
    "selector": "example",
    "type": "example",
    "use_modification_engine": true,
    "value": "example",
    "value_engine": "example"
  }
}
```

### Get user

Get one user of the account: their role, name, email and when they last signed in.

**Inputs**

- User (`membership_id`, number, required): The user, as a member of this account. At least 1.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "user": {
        "connection_count": 1,
        "creation_date": "example",
        "email": "example",
        "firstname": "example",
        "id": 1,
        "last_login_time": "example",
        "lastname": "example",
        "mfa_enabled": true
      }
    },
    "id": 1,
    "role": "example"
  }
}
```

### Get variation

Get one variation of a campaign.

**Inputs**

- Campaign (`test_id`, number, required): The campaign. At least 1.
- Variation (`variation_id`, number, required): The variation of the campaign. The original version is 0. At least 0.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "description": "example",
    "id": 1,
    "name": "example",
    "traffic": 1,
    "type": "example"
  }
}
```

### List analytics tool links

List the analytics and third-party tools a campaign sends its data to, such as Google Analytics.

**Inputs**

- Campaign (`test_id`, number, required): The campaign. At least 1.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Records per page (`per_page`, number): How many records each page holds. AB Tasty returns 10 when this is empty. At least 1.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "items": [
        {
          "custom_tracker": "example",
          "from_account": 1,
          "id": 1,
          "name": "example",
          "value": "example"
        }
      ]
    },
    "limit": 1,
    "page": 1,
    "pages": 1,
    "total": 1
  }
}
```

### List campaign events

List the clicks and other actions a campaign tracks, and the plugins it uses.

**Inputs**

- Campaign (`test_id`, number, required): The campaign. At least 1.
- Kind (`type`, text): Only tracked actions, or only plugins. Leave empty for both. One of: `actionTracking` (Action tracking), `plugin`.
- Order (`sort_by_id`, text): List the newest or the oldest first. One of: `DESC` (Newest first), `ASC` (Oldest first).
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Records per page (`per_page`, number): How many records each page holds. AB Tasty returns 10 when this is empty. At least 1.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "items": [
        {
          "config": "example",
          "id": 1,
          "type": "example",
          "value": "example"
        }
      ]
    },
    "limit": 1,
    "page": 1,
    "pages": 1,
    "total": 1
  }
}
```

### List campaigns

List the account's campaigns (tests and personalizations), with filters for type, running or paused, schedule and tags.

**Inputs**

- Search (`search`, text): Only campaigns whose name, URL or ID contains this.
- Types (`types`, list): Only campaigns of these types. Leave empty for every type. One or more of: `ab` (A/B test), `multipage` (Multipage test), `mvt` (Multivariate test (mvt)), `multivariate` (Multivariate test), `mastersegment` (Personalization), `subsegment` (Personalization scenario), `segmentation`, `predictive`, `tunnel` (Funnel), `mobileapp` (Mobile app), `heatmap`.
- Running or paused (`running`, text): Only running or only paused campaigns. Leave empty for both. One of: `1` (Running), `0` (Paused).
- Schedule (`scheduled`, text): Only campaigns with, or without, a scheduled start or end. One of: `1` (Scheduled), `0` (Not scheduled).
- Pre-production only (`preprod_only`, true/false): Only campaigns in pre-production.
- Tags (`tags`, list): Only campaigns with these tags.
- Leave out tags (`exclude_tags`, list): Leave out campaigns with these tags.
- Order (`sort_by_id`, text): List the newest or the oldest campaigns first. One of: `DESC` (Newest first), `ASC` (Oldest first).
- Order by name (`sort_by_name`, text): List campaigns by name. One of: `ASC` (A to Z), `DESC` (Z to A).
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Records per page (`per_page`, number): How many records each page holds. AB Tasty returns 10 when this is empty. At least 1.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "items": [
        {
          "active": true,
          "audience_id": "example",
          "creation_date": "example",
          "creator_id": 1,
          "description": "example",
          "id": 1,
          "labels": [
            "example"
          ],
          "last_pause_timestamp": 1,
          "last_play_timestamp": 1,
          "name": "example",
          "preprod": true,
          "report_token": "example",
          "start_datetime": 1,
          "start_stop_timezone": "example",
          "state": "example",
          "stop_datetime": 1,
          "test_visitor_count": 1,
          "traffic": 1,
          "tunnel_parent": 1,
          "type": "example",
          "url": "example",
          "visitors_count": 1
        }
      ]
    },
    "limit": 1,
    "page": 1,
    "pages": 1,
    "total": 1
  }
}
```

### List modifications

List the changes a variation makes to the page: each one's type, CSS selector and value.

**Inputs**

- Campaign (`test_id`, number, required): The campaign. At least 1.
- Variation (`variation_id`, number, required): The variation of the campaign. The original version is 0. At least 0.
- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Records per page (`per_page`, number): How many records each page holds. AB Tasty returns 10 when this is empty. At least 1.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "items": [
        {
          "id": 1,
          "name": "example",
          "recursive": "example",
          "selector": "example",
          "type": "example",
          "use_modification_engine": true,
          "value": "example",
          "value_engine": "example"
        }
      ]
    },
    "limit": 1,
    "page": 1,
    "pages": 1,
    "total": 1
  }
}
```

### List users

List the people who can use this AB Tasty account, with their role, email and last sign-in.

**Inputs**

- Page (`page`, number): Which page of results to return, starting at 1. At least 1.
- Records per page (`per_page`, number): How many records each page holds. AB Tasty returns 10 when this is empty. At least 1.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "_embedded": {
      "items": [
        {
          "_embedded": {
            "user": {
              "connection_count": 1,
              "creation_date": "example",
              "email": "example",
              "firstname": "example",
              "id": 1,
              "last_login_time": "example",
              "lastname": "example",
              "mfa_enabled": true
            }
          },
          "id": 1,
          "role": "example"
        }
      ]
    },
    "limit": 1,
    "page": 1,
    "pages": 1,
    "total": 1
  }
}
```

### List variations

List a campaign's variations, including the original, with each one's share of traffic.

**Inputs**

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

**Outputs**

- `data` (list): The response from AB Tasty.

**Example output**

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

### Remove user

Take away a user's access to the account.

**Inputs**

- User (`membership_id`, number, required): The user, as a member of this account. At least 1.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "membership_id": 1,
    "removed": true
  }
}
```

### Update AB Tasty script

Rebuild the AB Tasty script your website loads, so it carries the campaigns' latest changes.

**Inputs**: None.

**Outputs**

- `data` (object): The response from AB Tasty.

**Example output**

```json
{
  "data": {
    "rebuilt": true
  }
}
```
