---
schema_version: "1"
id: ec71b8858aad605e4c6aad3092bb3d0fb29f562ea29986230f670f72e1c36daf
title: Collections and Recovery | Compile Script for Next Call Based on Previous Collections Interactions
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/agent_ref_collections_compile_script.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.agent_ref_collections_compile_script.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 7c087275e6be2c5418983a2ec29f5e6d2a5decc7269f203345e965766bf5d7c1
description: Gets recent voice call records and their transcripts, truncates the combined transcript text to a predefined character length, and provides the summary to the user. Also, gathers notes associated with the collection plan, combines note titles and text previews, truncates this combined text to a predefined length, and provides the summary to the user. Compiles a call script for collections specialists for their next customer conversation.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# Collections and Recovery | Compile Script for Next Call Based on Previous Collections Interactions

Gets recent voice call records and their transcripts, truncates the combined transcript text to a predefined character length, and provides the summary to the user. Also, gathers notes associated with the collection plan, combines note titles and text previews, truncates this combined text to a predefined length, and provides the summary to the user. Compiles a call script for collections specialists for their next customer conversation.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions with the Agentforce for Financial Services add-on or included in Agentforce 1 Financial Services Edition. Requires each user to have the Agentforce for Financial Services add-on to access the action.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
      <colgroup>
        <col>
        <col>
      </colgroup>
      <thead class="slds-text-title_caps ">
        <tr class="">
          <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d117621e70">User Permissions Needed</th>
        </tr>
      </thead>
      <tbody>
        <tr class="">
          <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d117621e70 ">To compile script for the next call:</td>

          <td class="slds-cell-wrap" style="vertical-align:top;" headers="d117621e70 ">
            <p>Collections and Recovery Specialist</p>
            <p>AND</p>
            <p style="margin-bottom:0;">Einstein for Financial Services</p>
          </td>

        </tr>
        <tr class="">
          <td class="slds-cell-wrap" colspan="2" style="vertical-align:top;" headers="d117621e70 ">See <a href="https://help.salesforce.com/s/articleView?id=ai.agent_actions_common_perms.htm&amp;type=5&amp;language=en_US" target="_blank">Common User Access for Standard Agent Actions</a>.</td>

        </tr>
      </tbody>
    </table>

## Action Details

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small "><colgroup><col style="width:50%"> <col style="width:50%"></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">API Name</td><td class="slds-cell-wrap" style="vertical-align:top;">CompileScriptForNextCallBasedOnPreviousCollectionsInteractions</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Reference Action Type</td><td class="slds-cell-wrap" style="vertical-align:top;">Prompt</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Reference Action</td><td class="slds-cell-wrap" style="vertical-align:top;">Compile Script for Next Call Based on Previous Collections Interactions</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Does this action execute one or more prompt templates?</td><td class="slds-cell-wrap" style="vertical-align:top;">Yes</td></tr></tbody></table>

## Compile Script for Next Call Based on Previous Collections Interactions and Prompt Templates

This action calls the SummarizeVoiceCallTranscriptsAndNotes prompt template to create a call script for the customer call based on previous collections interactions.