Evaluating Sales and Customer Service Representative Performance with Call Score and Insights UI

Objective: This tutorial will provide step-by-step guidance for developers on using Symbl.ai to analyze representative performance, understand meeting content, and identify coaching moments.

Outcome: Improved coaching strategies, enhanced product development, and optimized representative performance.

Prerequisites:

  • Sign-up for Symbl.ai platform. This will get you access to app_Id and app_Secret to make API calls to Symbl.ai APIs
  • Access to a recording or URL for audio/video conversation or a transcript to process

Step 1: Authentication: Obtain an access token for Symbl.ai API access.

Use your app_Id and app_Secret to generate an Access Token. Developers can also generate access token and process different types of conversations, using Symbl.ai Postman collection. Refer these docs to get started using Postman.

import requests
import time

# Replace these variables with your actual details
app_Id = "<YOUR_APP_ID>"
app_Secret = "<YOUR_APP_SECRET>"
video_url = "URL_of_your_video_file"  # Replace with the URL of your video file
conversation_name = "Your Conversation Name"  # Replace with your desired conversation name
sales_stage = "Your Sales Stage"  # Replace with the sales stage information
prospect_name = "Prospect Name"  # Replace with the name of the prospect


# Step 1: Obtain the Access Token
auth_response = requests.post(
    "https://api.symbl.ai/oauth2/token:generate",
    headers={"Content-Type": "application/json"},
    json={"type": "application", "appId": app_Id, "appSecret": app_Secret}
)

access_token = auth_response.json()["accessToken"]

Step 2: Process Meetings (Async API):

Use Symbl.ai's Async API to transcribe meeting audio or video into text. Select the appropriate API endpoint (audio, video, or text) based on your meeting format. In this tutorial we will use the Async Video URL API to process the conversation. If you need to process conversations of a different type, update the endpoint as mentioned in our docs.

To generate Call Score and Insights UI, add “callScore” and “insights” in the features list.

Make sure you add the metadata to provide additional context about a call such as the conversation type and sales stage to customize the call score algorithm so that the model understands to score the conversation based on the provided metadata. When setting conversationType and salesStage, the value must be lowercase. You can choose conversationType as sales or general, and salesStage as qualification, discovery, demo, negotiation, and general. You can also set the prospect name to show with whom the sales representative is interacting with if it is a sales call, or consider a place to show with whom the speaker in the conversation is interacting.

# Step 2: Process the Meeting

def process_video(access_token, video_url, conversation_name, sales_stage, prospect_name):
    url = "https://api.symbl.ai/v1/process/video/url"
    headers = {
        "Authorization": "Bearer " + access_token,
        "Content-Type": "application/json"
    }
    data = {
        "url": video_url,
        "name": conversation_name,
        "features": {"featureList": ["insights", "callScore"]},
        "metadata": {"salesStage": sales_stage, "prospectName": prospect_name},
	 "converstionType": "sales"
    }
    response = requests.post(url, headers=headers, json=data)
    if response.status_code == 200:
        return response.json()['conversationId']
    else:
        return None

Step 3: Check Generate Call Score:

After you have processed the conversation, wait for the callScore job to complete before proceeding.

Once the meeting is transcribed and call score processing status is complete, use the GET Call Score API to analyze the representative's performance in the meeting. The call score will provide metrics on communication effectiveness, engagement, and other key performance indicators.

# Step 3: Check call score generation status
# Function to wait for the call score to complete
def wait_for_call_score(access_token, conversation_id):
    url = "https://api.symbl.ai/v1/conversations/" + conversation_id + "/callscore/status"
    headers = {"Authorization": "Bearer " + access_token}
    while True:
        response = requests.get(url, headers=headers)
        if response.status_code == 200 and response.json().get('status') == 'completed':
            break
        time.sleep(5)  # Wait for 5 seconds before retrying

Once the call score status is complete, make an API call to GET call score.

# Function to get the call score

def get_call_score(access_token, conversation_id):  
    url = "<https://api.symbl.ai/v1/conversations/"> + conversation_id + "/callscore"  
    headers = {"Authorization": "Bearer " + access_token}  
    response = requests.get(url, headers=headers)  
    if response.status_code == 200:  
        return response.json().get("score")  
    else:  
        return None

Step 4: Understanding the Meeting (Generate Insights UI):

Use the Insights UI API to generate an overview of the meeting. This UI will provide insights into conversation themes, sentiment analysis, and key discussion points.

# Step 4: Check insights UI generation status

# Function to wait for the insights UI to complete

def wait_for_insights_UI(access_token, conversation_id):  
    url = "<https://api.symbl.ai/v1/conversations/"> + conversation_id + "/lm-insights/status"  
    headers = {"Authorization": "Bearer " + access_token}  
    while True:  
        response = requests.get(url, headers=headers)  
        if response.status_code == 200 and response.json().get('status') == 'completed':  
            break  
        time.sleep(5)  # Wait for 5 seconds before retrying

Once the Insights UI status is complete, make an API call to GET insights UI. The response will be a URL where you can open the URL in the browser to check the meeting insights.

# Function to get the insights UI details page

def get_call_score(access_token, conversation_id):  
    url = "<https://api.symbl.ai/v1/conversations/experiences/insights/details/"> + conversation_id  
    headers = {"Authorization": "Bearer " + access_token}  
    response = requests.get(url, headers=headers)  
    if response.status_code == 200:  
        return response.json().get("url")

# Store Insights UI URL

insights_ui_url = response.json().get("url")  
    else:  
        return None

To have a quick overview of the list of all conversations you processed, you can generate the Insights UI List page.

# Function to get the insights UI list page

def get_call_score(access_token):  
    url = "<https://api.symbl.ai/v1/conversations/experiences/insights/list">  
    headers = {"Authorization": "Bearer " + access_token}  
    response = requests.get(url, headers=headers)  
    if response.status_code == 200:  
        return response.json().get("url")

# Store Insights UI URL

insights_ui_url = response.json().get("url")  
    else:  
        return None

Step 5: Embed the URL into your application:

You can also embed the generated Insights UI List and Insights UI Details pages into a product, or your CRM, or internal tools. This provides you easy access to meeting insights and performance analysis and review by team members.

# Embed the generated insights UI details page into your application

<iframe src="{insights_ui_url}" width="100%" height="600"></iframe>

If you have any questions about this tutorial, contact [email protected]