# Medallia

> Work with Medallia Experience Cloud feedback: list survey responses and records, read fields and programs, work out average scores, send records to importers and follow imports, manage users and roles, and start workflows from new responses.

App · 23 actions. Web page: https://docs.lodol.com/docs/integrations/medallia

## Actions

### Activate or deactivate user

Activate a user account, or deactivate it so the person can no longer sign in.

**Inputs**

- User (`username`, text, required): The user's username. Pick one, or give it from an earlier step.
- Status (`status`, text, required): Active lets the person sign in; inactive stops them. One of: `active`, `inactive`.

**Outputs**

- `status` (text): ACTIVE or INACTIVE, as asked
- `username` (text): The user

**Example output**

```json
{
  "status": "INACTIVE",
  "username": "cc_executive"
}
```

### Calculate average score

Work out the average of a numeric field, such as likelihood to recommend, over completed responses, for a date range or a segment.

**Inputs**

- Field (`field_id`, text, required): The numeric field to average, such as e_ltr.
- On or after (`date_from`, date): Only records from this day on.
- On or before (`date_until`, date): Only records up to and including this day.
- Only where field (`filter_field`, text): A field to filter on, such as e_unitid or e_status. Give its values next.
- Has one of these values (`filter_values`, list): Keep records whose chosen field has one of these values, such as 0, 1 or 2.

**Outputs**

- `average` (number): The average, or null with no responses
- `field_id` (text): The field averaged
- `has_value` (true/false): False when no response had a value

**Example output**

```json
{
  "average": 8.395187118201767,
  "field_id": "e_ltr",
  "has_value": true
}
```

### Create user

Create a user account with a primary role, optionally emailing them Medallia's welcome message.

**Inputs**

- Username (`username`, text, required): The new username: letters, digits and - _ . @, for example mary.jackson.
- First name (`first_name`, text, required): The user's first name.
- Last name (`last_name`, text, required): The user's last name.
- Primary role (`primary_role`, text, required): The user's main role, which sets what they can see and do.
- Email (`email`, text): The user's email address.
- Phone (`phone`, text): The user's phone number.
- Other roles (`extra_roles`, list): Further roles the user also has.
- Send welcome email (`send_welcome_email`, true/false): Email the user Medallia's new-user message. Off by default.

**Outputs**

- `user` (object): The user account

**Example output**

```json
{
  "user": {
    "_system_properties": {
      "created_by": "admin",
      "created_on": "2026-01-05T10:00:00.000+0000",
      "last_login": "2026-03-01T08:00:00.000+0000",
      "login_count": 42,
      "modified_by": "admin",
      "modified_on": "2026-02-01T09:30:00.000+0000",
      "status": "ACTIVE"
    },
    "automatic_update": false,
    "company_account_id": "mjackson",
    "email": "mary@example.com",
    "excluded_from_user_activity": false,
    "first_name": "Mary",
    "last_name": "Jackson",
    "login_blocked": false,
    "phone": "+1 555 867 5309",
    "roles": {
      "extra_roles": [
        {
          "role": "Query API"
        }
      ],
      "primary_role": {
        "role": "Executive"
      }
    },
    "username": "cc_executive"
  }
}
```

### Get connection's roles

Get the roles the connected API client acts with in the Query API, to check what it can read.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `roles` (list): The roles

**Example output**

```json
{
  "count": 1,
  "roles": [
    {
      "id": "1234",
      "name": "Query API"
    }
  ]
}
```

### Get feedback record

Get one record (a response or an invitation) by its survey id, with the fields you choose.

**Inputs**

- Record ID (`record_id`, text, required): The record's survey id (all digits), from 'List feedback' or a trigger.
- Fields (`field_ids`, list): The fields to return for each record, such as e_ltr (likelihood to recommend) or e_email. The record's date is always included.

**Outputs**

- `record` (object): The record

**Example output**

```json
{
  "record": {
    "fields": {
      "e_ltr": {
        "labels": [
          "9"
        ],
        "values": [
          "9"
        ]
      },
      "e_responsedate": {
        "labels": [],
        "values": [
          "2026-03-23 20:15:37"
        ]
      }
    },
    "id": "12259397",
    "labels": {
      "e_ltr": "9",
      "e_responsedate": "2026-03-23 20:15:37"
    },
    "values": {
      "e_ltr": "9",
      "e_responsedate": "2026-03-23 20:15:37"
    }
  }
}
```

### Get import results

Get, record by record, what a background import kept and what it discarded and why.

**Inputs**

- Feed file ID (`feed_file_id`, text, required): The feed_file_id 'Import records in the background' returned.

**Outputs**

- `feed_file_id` (text): The feed file id
- `input_to_field_mappings` (object): Each input column with the fields it maps to
- `processing_error_description` (text): Why processing failed, empty if it didn't
- `processing_results` (list): Results by kind of entity

**Example output**

```json
{
  "feed_file_id": "0b6f7c1e-5d2a-4c3b-9e8f-1a2b3c4d5e6f",
  "input_to_field_mappings": {
    "email": [
      "e_email"
    ]
  },
  "processing_error_description": "",
  "processing_results": [
    {
      "discarded_results": [],
      "entity_name": "record",
      "successful_results": [
        {
          "input_position": 1,
          "result": "Selected for sampling"
        }
      ]
    }
  ]
}
```

### Get import status

Get where a background import has got to, with how many records succeeded, were discarded or were duplicates.

**Inputs**

- Feed file ID (`feed_file_id`, text, required): The feed_file_id 'Import records in the background' returned.

**Outputs**

- `feed_file` (object): The import
- `is_done` (true/false): Whether it has finished, failed or been cancelled
- `status` (text): The import's status

**Example output**

```json
{
  "feed_file": {
    "id": "0b6f7c1e-5d2a-4c3b-9e8f-1a2b3c4d5e6f",
    "stats": {
      "creation_date": "2026-03-23T20:15:37Z",
      "processing_mode": "ACTIVE",
      "records": {
        "discarded_count": 0,
        "duplicated_count": 0,
        "input_count": 1,
        "success_count": 1
      }
    },
    "status": "COMPLETED_RESULTS_READY"
  },
  "is_done": true,
  "status": "COMPLETED_RESULTS_READY"
}
```

### Get importer

Get one importer's description and the columns a record sent to it takes.

**Inputs**

- Importer (`importer_name`, text, required): The importer (web feed) to send records to. Pick one, or give its name.

**Outputs**

- `fields` (list): The columns a record takes
- `importer_name` (text): The importer's name
- `spec` (object): The importer's full OpenAPI document

**Example output**

```json
{
  "fields": [
    {
      "description": "Customer email",
      "name": "email",
      "required": true,
      "type": "string"
    }
  ],
  "importer_name": "active_b2b_org",
  "spec": {
    "info": {
      "title": "Import API",
      "version": "1.0.0"
    },
    "openapi": "3.0.1"
  }
}
```

### Get role

Get one role with its permissions and data views.

**Inputs**

- Role (`role_name`, text, required): The role. Pick one, or give its name.

**Outputs**

- `role` (object): The role

**Example output**

```json
{
  "role": {
    "_system_properties": {
      "created_on": "2025-11-01T10:00:00.000+0000",
      "modified_on": "2026-01-15T10:00:00.000+0000"
    },
    "display_order": 1,
    "group_name": "Executives",
    "name": "Executive",
    "permissions": {
      "administrative": [
        {
          "permission": "View Data from QueryAPI"
        }
      ],
      "reporting": [
        {
          "permission": "View Alerts"
        }
      ]
    },
    "role_type": "other"
  }
}
```

### Get user

Get one user account with its contact details, roles and status.

**Inputs**

- User (`username`, text, required): The user's username. Pick one, or give it from an earlier step.

**Outputs**

- `user` (object): The user account

**Example output**

```json
{
  "user": {
    "_system_properties": {
      "created_by": "admin",
      "created_on": "2026-01-05T10:00:00.000+0000",
      "last_login": "2026-03-01T08:00:00.000+0000",
      "login_count": 42,
      "modified_by": "admin",
      "modified_on": "2026-02-01T09:30:00.000+0000",
      "status": "ACTIVE"
    },
    "automatic_update": false,
    "company_account_id": "mjackson",
    "email": "mary@example.com",
    "excluded_from_user_activity": false,
    "first_name": "Mary",
    "last_name": "Jackson",
    "login_blocked": false,
    "phone": "+1 555 867 5309",
    "roles": {
      "extra_roles": [
        {
          "role": "Query API"
        }
      ],
      "primary_role": {
        "role": "Executive"
      }
    },
    "username": "cc_executive"
  }
}
```

### Import records

Send records, such as transactions to survey, to an importer and get how many were processed, matched existing records or were rejected.

**Inputs**

- Importer (`importer_name`, text, required): The importer (web feed) to send records to. Pick one, or give its name.
- Records (`records`, list, required): The records, each an object of the importer's columns, for example [{"email": "mary@example.com", "transaction_date": "2026-03-23T20:15:37.000Z"}]. 'Get importer' lists the columns.

**Outputs**

- `duplicates` (number): How many matched a record already there
- `importer_name` (text): The importer
- `queued` (true/false): True when the importer queued them for later, so no counts yet
- `records` (number): How many Medallia processed
- `rejects` (number): How many could not be processed
- `sent` (number): How many records were sent

**Example output**

```json
{
  "duplicates": 0,
  "importer_name": "store_transactions",
  "queued": false,
  "records": 1,
  "rejects": 0,
  "sent": 1
}
```

### Import records in the background

Queue records for an importer and get a feed file id, to follow the import with 'Get import status' and 'Get import results'.

**Inputs**

- Importer (`importer_name`, text, required): The importer (web feed) to send records to. Pick one, or give its name.
- Records (`records`, list, required): The records, each an object of the importer's columns, for example [{"email": "mary@example.com", "transaction_date": "2026-03-23T20:15:37.000Z"}]. 'Get importer' lists the columns.

**Outputs**

- `feed_file_id` (text): The id to follow the import by
- `importer_name` (text): The importer
- `sent` (number): How many records were sent

**Example output**

```json
{
  "feed_file_id": "0b6f7c1e-5d2a-4c3b-9e8f-1a2b3c4d5e6f",
  "importer_name": "store_transactions",
  "sent": 1
}
```

### List customers

List customers from CX Profiles (a Medallia add-on), optionally those whose attribute has one of some values. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Only where attribute (`attribute_key`, text): A profile attribute to filter on, such as first_name.
- Has one of these values (`attribute_values`, list): Keep customers whose attribute has one of these values.
- Page size (`page_size`, number): How many to return, 1 to 1000. From 1 to 1000.
- Page cursor (`cursor`, text): The next_cursor from an earlier page, to get the page after it.

**Outputs**

- `count` (number): How many on this page
- `customers` (list): The customers
- `has_more` (true/false): Whether there is another page
- `next_cursor` (text): Give this as Page cursor to get the next page; empty on the last

**Example output**

```json
{
  "count": 1,
  "customers": [
    {
      "email": "chris@example.com",
      "first_name": "Chris",
      "id": "1234567890",
      "last_name": "Smith",
      "phone": "(555) 867-5309"
    }
  ],
  "has_more": true,
  "next_cursor": "100"
}
```

### List feedback

List survey responses (or every record, invitations included) with the fields you choose, filtered by date or by a field's values. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Records (`record_set`, text): Completed responses only, or every record including unanswered invitations. One of: `responses` (Completed responses (default)), `all` (All records, including invitations not answered yet).
- Fields (`field_ids`, list): The fields to return for each record, such as e_ltr (likelihood to recommend) or e_email. The record's date is always included.
- On or after (`date_from`, date): Only records from this day on.
- On or before (`date_until`, date): Only records up to and including this day.
- Only where field (`filter_field`, text): A field to filter on, such as e_unitid or e_status. Give its values next.
- Has one of these values (`filter_values`, list): Keep records whose chosen field has one of these values, such as 0, 1 or 2.
- Order (`sort`, text): Newest or oldest first, by response date (or creation date for all records). One of: `newest` (Newest first (default)), `oldest` (Oldest first).
- Page size (`page_size`, number): How many to return, 1 to 1000. From 1 to 1000.
- Page cursor (`cursor`, text): The next_cursor from an earlier page, to get the page after it.

**Outputs**

- `count` (number): How many on this page
- `has_more` (true/false): Whether there is another page
- `next_cursor` (text): Give this as Page cursor to get the next page; empty on the last
- `records` (list): The records
- `total_count` (number): How many records match in all

**Example output**

```json
{
  "count": 1,
  "has_more": true,
  "next_cursor": "100",
  "records": [
    {
      "fields": {
        "e_ltr": {
          "labels": [
            "9"
          ],
          "values": [
            "9"
          ]
        },
        "e_responsedate": {
          "labels": [],
          "values": [
            "2026-03-23 20:15:37"
          ]
        }
      },
      "id": "12259397",
      "labels": {
        "e_ltr": "9",
        "e_responsedate": "2026-03-23 20:15:37"
      },
      "values": {
        "e_ltr": "9",
        "e_responsedate": "2026-03-23 20:15:37"
      }
    }
  ],
  "total_count": 289759
}
```

### List fields

List the fields records hold (survey questions and data fields) with their ids and types, optionally searching by id. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Search (`search`, text): Only fields whose id matches this text, such as ltr.
- Page size (`page_size`, number): How many to return, 1 to 1000. From 1 to 1000.
- Page cursor (`cursor`, text): The next_cursor from an earlier page, to get the page after it.

**Outputs**

- `count` (number): How many on this page
- `fields` (list): The fields
- `has_more` (true/false): Whether there is another page
- `next_cursor` (text): Give this as Page cursor to get the next page; empty on the last
- `total_count` (number): How many fields there are in all

**Example output**

```json
{
  "count": 1,
  "fields": [
    {
      "data_type": "INT",
      "description": "",
      "id": "e_ltr",
      "multivalued": false,
      "name": "Likelihood to recommend"
    }
  ],
  "has_more": true,
  "next_cursor": "MzA=",
  "total_count": 2290
}
```

### List importers

List the importers (web feeds) your Medallia instance takes records through.

**Inputs**: None.

**Outputs**

- `count` (number): How many
- `importers` (list): The importers

**Example output**

```json
{
  "count": 1,
  "importers": [
    {
      "description": "This web feed is for the client to send Medallia org hierarchy data.",
      "name": "active_b2b_org",
      "path": "/inbound/v2/async/active_b2b_org",
      "summary": "active_b2b_org"
    }
  ]
}
```

### List program fields

List the fields in one Experience Program's data. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Program (`program_id`, text, required): The Experience Program. Pick one, or give its id.
- Page size (`page_size`, number): How many to return, 1 to 1000. From 1 to 1000.
- Page cursor (`cursor`, text): The next_cursor from an earlier page, to get the page after it.

**Outputs**

- `count` (number): How many on this page
- `fields` (list): The fields
- `has_more` (true/false): Whether there is another page
- `next_cursor` (text): Give this as Page cursor to get the next page; empty on the last
- `program_id` (text): The program id
- `program_name` (text): The program's name
- `total_count` (number): How many fields there are in all

**Example output**

```json
{
  "count": 1,
  "fields": [
    {
      "data_type": "INT",
      "description": "",
      "id": "e_ltr",
      "multivalued": false,
      "name": "Likelihood to recommend"
    }
  ],
  "has_more": false,
  "next_cursor": "",
  "program_id": "6688cde1-3d7f-4486-b9ec-076c73d51364",
  "program_name": "Contact Center transactional agent interaction",
  "total_count": 42
}
```

### List programs

List the Experience Programs with their status, type and number of responses.

**Inputs**

- Page size (`page_size`, number): How many to return, 1 to 1000. From 1 to 1000.

**Outputs**

- `count` (number): How many
- `programs` (list): The programs

**Example output**

```json
{
  "count": 1,
  "programs": [
    {
      "created_by": "_medallia_system_test",
      "created_on": "2021-07-23 04:57:02",
      "description": "Program: Contact Center transactional agent interaction.",
      "id": "6688cde1-3d7f-4486-b9ec-076c73d51364",
      "name": "Contact Center transactional agent interaction",
      "responses_count": 2447,
      "status": "ACTIVE",
      "type": "ENTERPRISE"
    }
  ]
}
```

### List roles

List roles with their permissions and data views. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Roles (`role_names`, list): Only these roles.
- Page size (`page_size`, number): How many to return. Leave empty for Medallia's default. At least 1.
- Page cursor (`cursor`, text): The next_cursor from an earlier page, to get the page after it.

**Outputs**

- `count` (number): How many on this page
- `has_more` (true/false): Whether there is another page
- `next_cursor` (text): Give this as Page cursor to get the next page; empty on the last
- `roles` (list): The roles

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_cursor": "",
  "roles": [
    {
      "_system_properties": {
        "created_on": "2025-11-01T10:00:00.000+0000",
        "modified_on": "2026-01-15T10:00:00.000+0000"
      },
      "display_order": 1,
      "group_name": "Executives",
      "name": "Executive",
      "permissions": {
        "administrative": [
          {
            "permission": "View Data from QueryAPI"
          }
        ],
        "reporting": [
          {
            "permission": "View Alerts"
          }
        ]
      },
      "role_type": "other"
    }
  ]
}
```

### List users

List user accounts, optionally only those with a role or status. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Role (`role`, text): Only users with this role.
- Status (`status`, text): Only active, or only inactive, users. One of: `active`, `inactive`.
- Usernames (`usernames`, list): Only these usernames.
- Page size (`page_size`, number): How many to return. Leave empty for Medallia's default. At least 1.
- Page cursor (`cursor`, text): The next_cursor from an earlier page, to get the page after it.

**Outputs**

- `count` (number): How many on this page
- `has_more` (true/false): Whether there is another page
- `next_cursor` (text): Give this as Page cursor to get the next page; empty on the last
- `users` (list): The users

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_cursor": "",
  "users": [
    {
      "_system_properties": {
        "created_by": "admin",
        "created_on": "2026-01-05T10:00:00.000+0000",
        "last_login": "2026-03-01T08:00:00.000+0000",
        "login_count": 42,
        "modified_by": "admin",
        "modified_on": "2026-02-01T09:30:00.000+0000",
        "status": "ACTIVE"
      },
      "automatic_update": false,
      "company_account_id": "mjackson",
      "email": "mary@example.com",
      "excluded_from_user_activity": false,
      "first_name": "Mary",
      "last_name": "Jackson",
      "login_blocked": false,
      "phone": "+1 555 867 5309",
      "roles": {
        "extra_roles": [
          {
            "role": "Query API"
          }
        ],
        "primary_role": {
          "role": "Executive"
        }
      },
      "username": "cc_executive"
    }
  ]
}
```

### Reset user password

Reset a user's password, so Medallia emails them a link to set a new one.

**Inputs**

- User (`username`, text, required): The user's username. Pick one, or give it from an earlier step.

**Outputs**

- `reset` (true/false): Always true once Medallia accepts it
- `username` (text): The user

**Example output**

```json
{
  "reset": true,
  "username": "cc_executive"
}
```

### Run query

Run any read-only Query API (GraphQL) query, for data the other steps don't cover, such as aggregateTable. Changes are refused.

**Inputs**

- Query (`query`, text, required): The GraphQL query, for example query { me { roles { id name } } }.
- Variables (`variables`, object): Values for the query's $variables, by name.

**Outputs**

- `data` (object): What the query returned, under its own names

**Example output**

```json
{
  "data": {
    "me": {
      "roles": [
        {
          "id": "1234",
          "name": "Query API"
        }
      ]
    }
  }
}
```

### Update user

Change a user's name, email, phone or roles. Only the fields given change.

**Inputs**

- User (`username`, text, required): The user's username. Pick one, or give it from an earlier step.
- First name (`first_name`, text): A new first name. Leave empty to keep it.
- Last name (`last_name`, text): A new last name. Leave empty to keep it.
- Email (`email`, text): A new email address. Leave empty to keep it.
- Phone (`phone`, text): A new phone number. Leave empty to keep it.
- Primary role (`primary_role`, text): A new primary role. Leave empty to keep it.
- Other roles (`extra_roles`, list): Replaces the user's other roles. Leave empty to keep them.

**Outputs**

- `user` (object): The user account

**Example output**

```json
{
  "user": {
    "_system_properties": {
      "created_by": "admin",
      "created_on": "2026-01-05T10:00:00.000+0000",
      "last_login": "2026-03-01T08:00:00.000+0000",
      "login_count": 42,
      "modified_by": "admin",
      "modified_on": "2026-02-01T09:30:00.000+0000",
      "status": "ACTIVE"
    },
    "automatic_update": false,
    "company_account_id": "mjackson",
    "email": "mary@example.com",
    "excluded_from_user_activity": false,
    "first_name": "Mary",
    "last_name": "Jackson",
    "login_blocked": false,
    "phone": "+1 555 010 0000",
    "roles": {
      "extra_roles": [
        {
          "role": "Query API"
        }
      ],
      "primary_role": {
        "role": "Executive"
      }
    },
    "username": "cc_executive"
  }
}
```
