Skip to main content

Salesforce Integration

This guide explains how to integrate Descriptor.AI’s call analysis capabilities with Salesforce to automatically create records from analysis results.

Prerequisites

Before implementing the integration, you’ll need:
  1. A Salesforce Developer Edition account
  2. Salesforce REST API access configured
  3. Valid authentication tokens:
    • Salesforce access token
    • Descriptor.AI API token
  4. Custom Salesforce Object fields set up for storing analysis results
Follow the Salesforce REST API Documentation to set up your developer environment and authentication.

Implementation

The integration is handled through the SalesforceDescriptorIntegration class, which manages:
  • Audio submission to Descriptor.AI
  • Results polling and retrieval
  • Salesforce record creation

Basic Usage

integration = SalesforceDescriptorIntegration( sf_domain=“your-domain”, sf_access_token=“your-sf-token”, descriptor_token=“your-descriptor-token” )

Process a call recording

record_id = integration.process_call_recording(“https://path-to-audio.mp3”)

Full Python Implementation

Configuration

The integration requires three main parameters:
The default Salesforce API version is set to “v62.0”. You can modify this by passing the sf_api_version parameter during initialization.

Features

The integration provides several key features:

Audio Analysis Submission

Submits audio files to Descriptor.AI for processing with configured analysis parameters:
  • Transcript generation
  • Emotion analysis
  • Insights generation
  • Sentiment analysis

Results Polling

Automatically polls for analysis results with configurable retry attempts:
  • Default maximum retries: 30
  • 10-second interval between attempts
  • Automatic timeout handling

Salesforce Record Creation

Creates a Call Analysis record in Salesforce with:
  • Analysis summary
  • Agent actions
  • Automated record naming

Error Handling

The integration includes comprehensive error handling for:
  • API submission failures
  • Processing timeouts
  • Salesforce record creation errors
All errors are logged with detailed information for troubleshooting.

Custom Fields

Ensure the following custom fields are created in your Salesforce Object:
  • Call_Analysis__c (Object)
  • Summary_c__c (Text Area)
  • Agent_Actions_c__c (Text Area)
Custom fields can be created through the Salesforce CLI or Developer Console. Refer to Salesforce documentation for detailed instructions.