# SAP Ariba

> Read SAP Ariba procurement and sourcing: approvals waiting and the changes feed, requisitions and invoices, operational reports, sourcing projects and events with supplier bids, and procurement master data.

App · 15 actions. Web page: https://docs.lodol.com/docs/integrations/sap-ariba

## Actions

### Count report view records

Count the documents a reporting view template matches for the same filters as 'Run report view', and how many pages that is.

**Inputs**

- View template (`view_template_name`, text, required): The reporting view template to run, such as 'Requisition_SAP_createdRange'. System templates are named DocumentType_SAP|PeopleSoft|Generic_createdRange|updatedRange.
- Date to filter on (`date_field`, text): Which date 'From' and 'To' apply to. It must match the template: a 'createdRange' template filters on the created date, an 'updatedRange' one on the updated date. One of: `created` (Created date), `updated` (Updated date), `approval` (Approval date). Default: `created`.
- From (`date_from`, date and time): Start of the window. SAP Ariba reads at most 31 days at a time; with no dates and no document ids, the last 31 days are read.
- To (`date_to`, date and time): End of the window, at most 31 days after 'From'.
- Status (`status`, text): Only include documents with this status, such as Approved or Ordered.
- Document ids (`unique_names`, list): Only these documents, by number (such as PR123), up to 40. With ids and no dates, no date window is applied.

**Outputs**: How many records a report view matches

- `filters` (object): The filters sent
- `max_records_per_page` (number): Records per page
- `total_pages` (number): Pages of results
- `total_records` (number): Records matching the filters

**Example output**

```json
{
  "filters": {},
  "max_records_per_page": 50,
  "total_pages": 1,
  "total_records": 42
}
```

### Get approvable

Read one requisition, invoice or user profile by its approvable id: totals, requester, line items, comments, attachments and approval requests.

**Inputs**

- Approvable type (`approvable_type`, text, required): Which kind of document to read. One of: `requisitions`, `invoices`, `userprofiles` (User profiles). Default: `requisitions`.
- Approvable id (`approvable_id`, text, required): The approvable id, as 'List approvables' returns it in 'approvableId'.

**Outputs**: An approvable document

- `activeApprovalRequestIds` (list): Active request ids
- `activeApproverCount` (number): Active approvers
- `approvableId` (text): Approvable id
- `approvalRequests` (list): Approval requests
- `attachments` (list): Attachments
- `comments` (list): Comments
- `firstActiveApproverName` (text): First active approver
- `fullURL` (text): Link to the approvable in SAP Ariba
- `lastModified` (text): Last modified
- `lineItemCount` (number): Line items
- `lineItems` (list): Line items
- `realm` (text): Realm
- `requester` (object): Requester
- `requesterName` (text): Requester name
- `statusString` (text): Status
- `submitDate` (text): Submitted
- `timeUpdated` (text): Updated
- `title` (text): Title
- `totalCost` (object): An amount
- `uniqueName` (text): Document number, such as PR123
- `version` (number): Version

**Example output**

```json
{
  "approvableId": "AAAKAYXEeOY",
  "lineItemCount": 2,
  "requesterName": "Jane Smith",
  "statusString": "Submitted",
  "title": "Laptops for new hires",
  "totalCost": {
    "amount": 4200.0,
    "currency": "USD"
  },
  "uniqueName": "PR123"
}
```

### Get sourcing event

Read one sourcing event - RFI, RFP or auction - with its state, owner and dates, and optionally its line items, supplier invitations, teams, owners and custom fields.

**Inputs**

- Sourcing event (`event_id`, text, required): The event id, such as Doc12345, as shown on the event in SAP Ariba or in a project's documents.
- Include (`expand`, list): Also return these parts of the event. One or more of: `all` (Everything), `items` (Line items), `supplierInvitations` (Supplier invitations), `teams`, `owners`, `customFields` (Custom fields).

**Outputs**: A sourcing event

- `baselineSpend` (object): An amount
- `createDate` (text): Created
- `currency` (text): Currency
- `description` (text): Description
- `eventStateName` (text): Event state
- `eventTypeName` (text): Event type
- `hasAward` (true/false): Awarded
- `internalId` (text): Event id, such as Doc12345
- `isTest` (true/false): Test event
- `items` (list): Line items (when expanded)
- `lastModified` (text): Last modified
- `owner` (object): Owner
- `status` (text): Status
- `supplierInvitations` (list): Invitations (when expanded)
- `teams` (list): Teams (when expanded)
- `title` (text): Title
- `webJumperURL` (text): Link to the event in SAP Ariba

**Example output**

```json
{
  "currency": "USD",
  "eventTypeName": "RFP",
  "internalId": "Doc12345678",
  "status": "Open",
  "title": "Office furniture RFP"
}
```

### Get sourcing project

Read one sourcing project: title, status, owner, dates, commodities, regions, baseline spend and savings.

**Inputs**

- Sourcing project (`project_id`, text, required): The project id, such as WS12345, as shown on the project in SAP Ariba ('internalId').

**Outputs**: A sourcing project

- `actualSaving` (object): An amount
- `baselineSpend` (object): An amount
- `beginDate` (text): Begin date
- `commodities` (list): Commodities
- `createDate` (text): Created
- `currency` (text): Currency
- `departments` (list): Departments
- `description` (text): Description
- `dueDate` (text): Due date
- `internalId` (text): Project id
- `isTest` (true/false): Test project
- `lastModified` (text): Last modified
- `owner` (object): Owner
- `regions` (list): Regions
- `state` (text): State
- `status` (text): Status
- `targetSavingPct` (number): Target saving, percent
- `templateProjectTitle` (text): Template
- `title` (text): Title

**Example output**

```json
{
  "createDate": "2026-01-10T09:00:00Z",
  "currency": "USD",
  "internalId": "WS12345678",
  "lastModified": "2026-02-01T12:00:00Z",
  "status": "Active",
  "title": "Office furniture 2026"
}
```

### List approvables

List requisitions, invoices or user profiles with their totals, requester, status, line items and approval requests, up to 10 at a time. Filter by document number.

**Inputs**

- Approvable type (`approvable_type`, text, required): Which kind of document to read. One of: `requisitions`, `invoices`, `userprofiles` (User profiles). Default: `requisitions`.
- Document number (`unique_name`, text): Only the document with exactly this number, such as PR123.
- Number of results (`limit`, number): How many records to return, 1-10. Defaults to 10. From 1 to 10. Default: `10`.
- Skip (`offset`, number): How many records to skip; use 'next_offset' from the previous run to read the next page. Defaults to 0. From 0 to 10000000. Default: `0`.

**Outputs**: Approvables

- `approvables` (list): Approvables
- `count` (number): Records on this page
- `has_more` (true/false): Whether another page follows
- `limit` (number): Page size used
- `next_offset` (number): The 'Skip' value that reads the next page
- `offset` (number): Records skipped
- `total_count` (number): Records matching, across every page

**Example output**

```json
{
  "approvables": [
    {
      "approvableId": "AAAKAYXEeOY",
      "lineItemCount": 2,
      "requesterName": "Jane Smith",
      "statusString": "Submitted",
      "title": "Laptops for new hires",
      "totalCost": {
        "amount": 4200.0,
        "currency": "USD"
      },
      "uniqueName": "PR123"
    }
  ],
  "count": 1,
  "has_more": false,
  "limit": 50,
  "next_offset": 1,
  "offset": 0,
  "total_count": 1
}
```

### List approval changes

List changes to approvable documents - approvals activated, withdrawn, edited, fully approved or denied, and approvers added, removed or reassigned - oldest first. Pass the last run's 'last_change_sequence_id' as 'After change' to read only what is new, or filter by when the change happened. SAP Ariba keeps changes for 180 days.

**Inputs**

- After change (`after_change_id`, text): Only changes after this change sequence id.
- Created after (`created_after`, date and time): Only changes after this.
- Created before (`created_before`, date and time): Only changes before this; needs 'Created after' too.
- Number of results (`limit`, number): How many records to return, 1-1000. Defaults to 50. From 1 to 1000. Default: `50`.
- Skip (`offset`, number): How many records to skip; use 'next_offset' from the previous run to read the next page. Defaults to 0. From 0 to 10000000. Default: `0`.

**Outputs**: Approval changes

- `changes` (list): Approval changes
- `count` (number): Records on this page
- `has_more` (true/false): Whether another page follows
- `last_change_sequence_id` (text): The newest change read; pass it as 'After change' next time
- `limit` (number): Page size used
- `next_offset` (number): The 'Skip' value that reads the next page
- `offset` (number): Records skipped
- `total_count` (number): Records matching, across every page

**Example output**

```json
{
  "changes": [
    {
      "approvableId": "AAAKAYXEeOY",
      "approvableUniqueName": "PR123",
      "approvers": [
        {
          "uniqueName": "jsmith"
        }
      ],
      "changeSequenceId": "1001",
      "changeType": "ApprovableFullyApproved",
      "realm": "mytestrealm",
      "restResourceName": "requisitions"
    }
  ],
  "count": 1,
  "has_more": false,
  "last_change_sequence_id": "1001",
  "limit": 50,
  "next_offset": 1,
  "offset": 0,
  "total_count": 1
}
```

### List approval group members

List the users in an approval group with their names and email addresses.

**Inputs**

- Approval group (`group_id`, text, required): The group id, as 'List approval groups' returns it in 'id'.

**Outputs**: Group members

- `count` (number): Members returned
- `members` (list): Members

**Example output**

```json
{
  "count": 1,
  "members": [
    {
      "emailAddress": "jane@example.com",
      "name": "Jane Smith",
      "uniqueName": "jsmith"
    }
  ]
}
```

### List approval groups

List the groups that approval rules assign approvals to, or find one by its exact name (case and spaces matter).

**Inputs**

- Group name (`group_name`, text): Only the group with exactly this name.

**Outputs**: Approval groups

- `count` (number): Groups returned
- `groups` (list): Groups

**Example output**

```json
{
  "count": 1,
  "groups": [
    {
      "id": "G1",
      "uniqueName": "Purchasing Agent"
    }
  ]
}
```

### List event supplier bids

List the bids suppliers placed on a sourcing event's items, with each bid's terms and amounts. Narrow to one supplier's invitation, and to one item.

**Inputs**

- Sourcing event (`event_id`, text, required): The event id, such as Doc12345, as shown on the event in SAP Ariba or in a project's documents.
- Supplier invitation (`invitation_id`, text): Only this supplier's bids, by the 'invitationId' from 'List event supplier invitations'.
- Item (`item_id`, text): Only bids on this item id; needs 'Supplier invitation'.

**Outputs**: Supplier bids

- `bids` (list): Bids
- `count` (number): Bids returned
- `event_id` (text): The event read

**Example output**

```json
{
  "bids": [
    {
      "eventId": "Doc12345678",
      "invitationId": "INV1",
      "itemId": "1"
    }
  ],
  "count": 1,
  "event_id": "Doc12345678"
}
```

### List event supplier invitations

List the suppliers invited to a sourcing event, with their organization and main contact.

**Inputs**

- Sourcing event (`event_id`, text, required): The event id, such as Doc12345, as shown on the event in SAP Ariba or in a project's documents.
- Fields to return (`fields`, list): Only return these fields. Leave empty for all. One or more of: `submissionDate` (Submission date), `supplierBidStatus` (Supplier bid status).

**Outputs**: Supplier invitations

- `count` (number): Invitations returned
- `event_id` (text): The event read
- `invitations` (list): Invitations

**Example output**

```json
{
  "count": 1,
  "event_id": "Doc12345678",
  "invitations": [
    {
      "invitationId": "INV1",
      "orgId": "AN0100000001"
    }
  ]
}
```

### List master data records

List procurement master data - users, groups, suppliers, currencies, units of measure, commodity codes, countries and more - with an optional OData filter and sort.

**Inputs**

- Entity (`entity_name`, text, required): Which master data to read, such as users or currency.
- Filter (`odata_filter`, text): An OData $filter expression on the entity's fields.
- Fields to return (`fields`, list): Only return these fields, by name.
- Sort by (`order_by`, text): An OData $orderby expression, such as 'UniqueName asc'.
- Include inactive (`include_inactive`, true/false): Also include inactive records.
- Language (`language`, text): Language code for translated names, such as en or de. Defaults to en.
- Number of results (`limit`, number): How many records to return, 1-1000. Defaults to 50. From 1 to 1000. Default: `50`.
- Skip (`offset`, number): How many records to skip; use 'next_offset' from the previous run to read the next page. Defaults to 0. From 0 to 10000000. Default: `0`.

**Outputs**: Master data records

- `count` (number): Records on this page
- `entity_name` (text): The entity read
- `has_more` (true/false): Whether another page follows
- `limit` (number): Page size used
- `next_offset` (number): The 'Skip' value that reads the next page
- `offset` (number): Records skipped
- `records` (list): Records
- `total_count` (number): Records matching, across every page

**Example output**

```json
{
  "count": 1,
  "entity_name": "users",
  "has_more": false,
  "limit": 50,
  "next_offset": 1,
  "offset": 0,
  "records": [
    {
      "Active": "true",
      "SystemId": "SYS1",
      "UniqueName": "jsmith"
    }
  ],
  "total_count": 1
}
```

### List pending approvals

List requisitions, invoices and user profiles waiting for approval, one row per approver, with a link to each. Filter by approvable type or by approver - SAP Ariba applies only one of the two.

**Inputs**

- Approvable type (`approvable_type`, text): Only this kind of document. Leave empty to filter by approver. One of: `requisitions`, `invoices`, `userprofiles` (User profiles).
- Approver (`approver`, text): Only documents waiting for this Ariba user id. Leave empty when filtering by type.
- Number of results (`limit`, number): How many records to return, 1-100. Defaults to 50. From 1 to 100. Default: `50`.
- Skip (`offset`, number): How many records to skip; use 'next_offset' from the previous run to read the next page. Defaults to 0. From 0 to 10000000. Default: `0`.

**Outputs**: Pending approvals

- `count` (number): Records on this page
- `has_more` (true/false): Whether another page follows
- `limit` (number): Page size used
- `next_offset` (number): The 'Skip' value that reads the next page
- `offset` (number): Records skipped
- `pending_approvals` (list): Pending approvals
- `total_count` (number): Records matching, across every page

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "limit": 50,
  "next_offset": 1,
  "offset": 0,
  "pending_approvals": [
    {
      "approvableId": "AAAKAYXEeOY",
      "approvableType": "requisitions",
      "approvableUniqueName": "PR123",
      "approver": "jsmith"
    }
  ],
  "total_count": 1
}
```

### List project documents

List a sourcing project's documents and events, with their type, version, owner and lock status.

**Inputs**

- Sourcing project (`project_id`, text, required): The project id, such as WS12345, as shown on the project in SAP Ariba ('internalId').
- Number of results (`limit`, number): How many records to return, 1-500. Defaults to 50. From 1 to 500. Default: `50`.
- Skip (`offset`, number): How many records to skip; use 'next_offset' from the previous run to read the next page. Defaults to 0. From 0 to 10000000. Default: `0`.

**Outputs**: Project documents

- `count` (number): Records on this page
- `documents` (list): Documents
- `has_more` (true/false): Whether another page follows
- `limit` (number): Page size used
- `next_offset` (number): The 'Skip' value that reads the next page
- `offset` (number): Records skipped
- `project_id` (text): The project read
- `total_count` (number): Records matching, across every page

**Example output**

```json
{
  "count": 1,
  "documents": [
    {
      "internalId": "Doc12345678",
      "title": "Office furniture RFP"
    }
  ],
  "has_more": false,
  "limit": 50,
  "next_offset": 1,
  "offset": 0,
  "project_id": "WS12345678",
  "total_count": 1
}
```

### List project tasks

List a sourcing project's tasks with their owner, status, document and approvers.

**Inputs**

- Sourcing project (`project_id`, text, required): The project id, such as WS12345, as shown on the project in SAP Ariba ('internalId').
- Number of results (`limit`, number): How many records to return, 1-500. Defaults to 50. From 1 to 500. Default: `50`.
- Skip (`offset`, number): How many records to skip; use 'next_offset' from the previous run to read the next page. Defaults to 0. From 0 to 10000000. Default: `0`.

**Outputs**: Project tasks

- `count` (number): Records on this page
- `has_more` (true/false): Whether another page follows
- `limit` (number): Page size used
- `next_offset` (number): The 'Skip' value that reads the next page
- `offset` (number): Records skipped
- `project_id` (text): The project read
- `tasks` (list): Tasks
- `total_count` (number): Records matching, across every page

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "limit": 50,
  "next_offset": 1,
  "offset": 0,
  "project_id": "WS12345678",
  "tasks": [
    {
      "internalId": "TSK1",
      "status": "Active",
      "title": "Review RFP"
    }
  ],
  "total_count": 1
}
```

### Run report view

Read one page of procurement documents - requisitions, orders, receipts, invoices - through a reporting view template, filtered by a date window of up to 31 days, status or document numbers. Pass 'page_token' back to read the next page.

**Inputs**

- View template (`view_template_name`, text, required): The reporting view template to run, such as 'Requisition_SAP_createdRange'. System templates are named DocumentType_SAP|PeopleSoft|Generic_createdRange|updatedRange.
- Date to filter on (`date_field`, text): Which date 'From' and 'To' apply to. It must match the template: a 'createdRange' template filters on the created date, an 'updatedRange' one on the updated date. One of: `created` (Created date), `updated` (Updated date), `approval` (Approval date). Default: `created`.
- From (`date_from`, date and time): Start of the window. SAP Ariba reads at most 31 days at a time; with no dates and no document ids, the last 31 days are read.
- To (`date_to`, date and time): End of the window, at most 31 days after 'From'.
- Status (`status`, text): Only include documents with this status, such as Approved or Ordered.
- Document ids (`unique_names`, list): Only these documents, by number (such as PR123), up to 40. With ids and no dates, no date window is applied.
- Include inactive (`include_inactive`, true/false): Also include inactive documents.
- Page token (`page_token`, text): The 'page_token' from the previous run, to read the next page.

**Outputs**: One page of a report view

- `count` (number): Records on this page
- `filters` (object): The filters sent
- `has_more` (true/false): Whether another page follows
- `page_token` (text): Pass as 'Page token' to read the next page
- `records` (list): Records

**Example output**

```json
{
  "count": 1,
  "filters": {
    "createdDateFrom": "2026-01-01T00:00:00Z",
    "createdDateTo": "2026-01-31T00:00:00Z"
  },
  "has_more": false,
  "page_token": null,
  "records": [
    {
      "Name": "Laptops",
      "UniqueName": "PR123"
    }
  ]
}
```
