Summarization

This page contains the API documentation for the Conversation Summarization UI module. This module is used to generate a summary of a conversation.

Usage

Import the module in your HTML page using the following code:

 < script 
  
 src 
 = 
 "https://www.gstatic.com/agent-assist-ui-modules/v1/summarization.js" 
>< / 
 script 
> 

Embed the module using the following tag:

 < agent 
 - 
 assist 
 - 
 summarization 
> 

Attributes

Property name Type Comment
show-generate-summary-button
BooleanString Whether to show the Generate Summarybutton.

Usage

Attributes are string-based component properties which can be set in the following ways:

From your HTML template directly:

 < element 
 - 
 selector 
  
 property 
 - 
 name 
 = 
 "value" 
> 

From your JavaScript code:

  var 
  
 el 
  
 = 
  
 document 
 . 
 querySelector 
 ( 
 'element-selector' 
 ); 
 el 
 . 
 setAttribute 
 ( 
 'property-name' 
 , 
  
 'value' 
 ); 
 

Inputs

Property name Type Comment
onSaveSummary
OnSaveSummary Callback to invoke when summary is saved. Used by customers to send summary details to CRM.

Usage

Inputs are typically JavaScript objects or other complex property types which must be assigned on the element instance directly:

  const 
  
 el 
  
 = 
  
 document 
 . 
 querySelector 
 ( 
 'element-selector' 
 ); 
 el 
 . 
 propertyName 
  
 = 
  
 value 
 ; 
 

Types

See the following section for the custom types used by the component.

BooleanString

  "true" 
  
 | 
  
 "false" 
 

OnSaveSummary

  type 
  
 OnSaveSummary 
  
 = 
  
 ( 
  
 summary 
 : 
  
 { 
  
 summary 
 : 
  
 string 
 ; 
  
 conversationDetails 
 : 
  
 ConversationDetails 
 ; 
  
 }, 
  
 saveCallbacks 
 : 
  
 { 
  
 setLoading 
 : 
  
 () 
  
 = 
>  
 void 
 ; 
  
 setSuccess 
 : 
  
 ( 
 message 
 : 
  
 string 
 ) 
  
 = 
>  
 void 
 ; 
  
 setError 
 : 
  
 ( 
 message 
 : 
  
 string 
 ) 
  
 = 
>  
 void 
 ; 
  
 } 
 ) 
  
 = 
>  
 void 
 ; 
 
Create a Mobile Website
View Site in Mobile | Classic
Share by: