iOS Data Models Overview

The Agentforce iOS SDK provides a comprehensive data modeling system that handles all aspects of conversational AI data, from Salesforce object metadata to participant interactions. The data models are designed to provide type-safe, efficient access to conversation data while maintaining compatibility with Salesforce's data structures.

Data Model Architecture

The data modeling system is organized into several key categories that work together to provide a complete data representation layer:

Core Data Models

Interaction Models

Data Model Categories

Object and Record Management

The SDK provides comprehensive support for Salesforce data structures:

Object Representation

  • Metadata Management: Complete object metadata including labels, descriptions, and capabilities
  • Field Definitions: Detailed field information with types, validation rules, and display properties
  • Relationship Mapping: Object relationships and reference handling
  • Theme Integration: Visual theming information for object display

Record Handling

  • Data Access: Efficient access to record data with type safety
  • Field Values: Comprehensive field value management with proper typing
  • Collection Support: Bulk record operations and collection management
  • UI Optimization: Record data optimized for display in UI components

Interaction Tracking

The system provides detailed tracking of conversation interactions:

Participant Management

  • Action Tracking: Monitor individual participant actions and behaviors
  • Interaction Patterns: Analyze interaction sequences and patterns
  • Status Management: Track participant status and availability
  • Role Management: Handle different participant roles and permissions

Escalation Handling

  • Escalation Triggers: Automatic and manual escalation triggers
  • Workflow Management: Escalation workflow state and progression
  • Agent Handoff: Seamless handoff between different agent types
  • Status Tracking: Monitor escalation status and resolution

Data Model Benefits

Type Safety

  • Compile-Time Validation: Type-safe access to all data structures
  • Null Safety: Proper handling of optional values and null states
  • Type Inference: Automatic type inference for improved developer experience

Performance

  • Efficient Access: Optimized data access patterns for UI components
  • Memory Management: Efficient memory usage for large data sets
  • Caching: Intelligent caching of frequently accessed data

Integration

  • Salesforce Compatibility: Full compatibility with Salesforce data structures
  • API Integration: Seamless integration with Salesforce APIs
  • Custom Extensions: Support for custom data extensions and modifications

Usage Patterns

Basic Object Access

Access object metadata and field information using the comprehensive data model classes.

Record Operations

Work with record collections and individual record data using the optimized data models.

Interaction Tracking

Track participant actions and interactions using the specialized interaction models.

Best Practices

  • Use Type-Safe Access: Leverage the type-safe data models for reliable data access
  • Handle Optional Values: Properly handle optional values and null states
  • Optimize for UI: Use UI-optimized models for display components
  • Cache Frequently Used Data: Implement caching for performance-critical data
  • Monitor Performance: Track data access patterns and optimize as needed

Next Steps