---
schema_version: "1"
id: a46a363c5339678f0f44caabdeae6734bf379624be7b2bc54ee3267c721ff501
title: AgentforceUIApiRecordCollection
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/genai/agentforce-mobile-sdk/references/ios/agentforce-ui-api-record-collection-ios.md
canonical_url: https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-ui-api-record-collection-ios.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 088623ef698128af8a3e631dc3db10c2a6647a5d6475d198612b507d39ce7adb
products:
  - Agentforce Mobile SDK
  - Agentforce and Einstein Generative AI
---
# AgentforceUIApiRecordCollection

## Overview

A data structure that represents a collection of UI API records in Agentforce conversations. It provides pagination support and metadata for managing multiple records from the UI API.

## Declaration

```swift
struct AgentforceUIAPIRecordCollection
```

## Properties

| Property            | Type                               | Description                                   |
| ------------------- | ---------------------------------- | --------------------------------------------- |
| `count`             | `Int`                              | The total number of records in the collection |
| `currentPageToken`  | `String`                           | Token for the current page                    |
| `currentPageUrl`    | `String`                           | URL for the current page                      |
| `nextPageToken`     | `String?`                          | Token for the next page, if available         |
| `nextPageUrl`       | `String?`                          | URL for the next page, if available           |
| `previousPageToken` | `String?`                          | Token for the previous page, if available     |
| `previousPageUrl`   | `String?`                          | URL for the previous page, if available       |
| `records`           | `[AgentforceRecordRepresentation]` | Array of record representations               |

## Methods

| Method                                                                                                             | Signature                                                                                                                                                                                                                                   | Description                                                          |
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `init(count:currentPageToken:currentPageUrl:nextPageToken:nextPageUrl:previousPageToken:previousPageUrl:records:)` | `init(count: Int, currentPageToken: String, currentPageUrl: String, nextPageToken: String? = nil, nextPageUrl: String? = nil, previousPageToken: String? = nil, previousPageUrl: String? = nil, records: [AgentforceRecordRepresentation])` | Creates a new record collection with pagination metadata and records |
| `init(from:)`                                                                                                      | `init(from decoder: Decoder) throws`                                                                                                                                                                                                        | Creates a new instance from a decoder (inherited from Decodable)     |
