resources.proto 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.contactcenterinsights.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/duration.proto";
  19. import "google/protobuf/timestamp.proto";
  20. import "google/api/annotations.proto";
  21. option csharp_namespace = "Google.Cloud.ContactCenterInsights.V1";
  22. option go_package = "google.golang.org/genproto/googleapis/cloud/contactcenterinsights/v1;contactcenterinsights";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "ResourcesProto";
  25. option java_package = "com.google.cloud.contactcenterinsights.v1";
  26. option php_namespace = "Google\\Cloud\\ContactCenterInsights\\V1";
  27. option ruby_package = "Google::Cloud::ContactCenterInsights::V1";
  28. option (google.api.resource_definition) = {
  29. type: "dialogflow.googleapis.com/Participant"
  30. pattern: "projects/{project}/conversations/{conversation}/participants/{participant}"
  31. pattern: "projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}"
  32. };
  33. // The conversation resource.
  34. message Conversation {
  35. option (google.api.resource) = {
  36. type: "contactcenterinsights.googleapis.com/Conversation"
  37. pattern: "projects/{project}/locations/{location}/conversations/{conversation}"
  38. };
  39. // Call-specific metadata.
  40. message CallMetadata {
  41. // The audio channel that contains the customer.
  42. int32 customer_channel = 1;
  43. // The audio channel that contains the agent.
  44. int32 agent_channel = 2;
  45. }
  46. // A message representing the transcript of a conversation.
  47. message Transcript {
  48. // A segment of a full transcript.
  49. message TranscriptSegment {
  50. // Word-level info for words in a transcript.
  51. message WordInfo {
  52. // Time offset of the start of this word relative to the beginning of
  53. // the total conversation.
  54. google.protobuf.Duration start_offset = 1;
  55. // Time offset of the end of this word relative to the beginning of the
  56. // total conversation.
  57. google.protobuf.Duration end_offset = 2;
  58. // The word itself. Includes punctuation marks that surround the word.
  59. string word = 3;
  60. // A confidence estimate between 0.0 and 1.0 of the fidelity of this
  61. // word. A default value of 0.0 indicates that the value is unset.
  62. float confidence = 4;
  63. }
  64. // The text of this segment.
  65. string text = 1;
  66. // A confidence estimate between 0.0 and 1.0 of the fidelity of this
  67. // segment. A default value of 0.0 indicates that the value is unset.
  68. float confidence = 2;
  69. // A list of the word-specific information for each word in the segment.
  70. repeated WordInfo words = 3;
  71. // The language code of this segment as a
  72. // [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
  73. // Example: "en-US".
  74. string language_code = 4;
  75. // For conversations derived from multi-channel audio, this is the channel
  76. // number corresponding to the audio from that channel. For
  77. // audioChannelCount = N, its output values can range from '1' to 'N'. A
  78. // channel tag of 0 indicates that the audio is mono.
  79. int32 channel_tag = 5;
  80. // The participant of this segment.
  81. ConversationParticipant segment_participant = 9;
  82. }
  83. // A list of sequential transcript segments that comprise the conversation.
  84. repeated TranscriptSegment transcript_segments = 1;
  85. }
  86. // Possible media for the conversation.
  87. enum Medium {
  88. // Default value.
  89. MEDIUM_UNSPECIFIED = 0;
  90. // The format for conversations that took place over the phone.
  91. PHONE_CALL = 1;
  92. // The format for conversations that took place over chat.
  93. CHAT = 2;
  94. }
  95. // Metadata that applies to the conversation.
  96. oneof metadata {
  97. // Call-specific metadata.
  98. CallMetadata call_metadata = 7;
  99. }
  100. // A time to live expiration setting, can be either a specified timestamp or a
  101. // duration from the time that the conversation creation request was received.
  102. // Conversations with an expiration set will be removed up to 24 hours after
  103. // the specified time.
  104. oneof expiration {
  105. // The time at which this conversation should expire. After this time, the
  106. // conversation data and any associated analyses will be deleted.
  107. google.protobuf.Timestamp expire_time = 15;
  108. // Input only. The TTL for this resource. If specified, then this TTL will
  109. // be used to calculate the expire time.
  110. google.protobuf.Duration ttl = 16 [(google.api.field_behavior) = INPUT_ONLY];
  111. }
  112. // Immutable. The resource name of the conversation.
  113. // Format:
  114. // projects/{project}/locations/{location}/conversations/{conversation}
  115. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  116. // The source of the audio and transcription for the conversation.
  117. ConversationDataSource data_source = 2;
  118. // Output only. The time at which the conversation was created.
  119. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  120. // Output only. The most recent time at which the conversation was updated.
  121. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  122. // The time at which the conversation started.
  123. google.protobuf.Timestamp start_time = 17;
  124. // A user-specified language code for the conversation.
  125. string language_code = 14;
  126. // An opaque, user-specified string representing the human agent who handled
  127. // the conversation.
  128. string agent_id = 5;
  129. // A map for the user to specify any custom fields. A maximum of 20 labels per
  130. // conversation is allowed, with a maximum of 256 characters per entry.
  131. map<string, string> labels = 6;
  132. // Output only. The conversation transcript.
  133. Transcript transcript = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  134. // Immutable. The conversation medium.
  135. Medium medium = 9 [(google.api.field_behavior) = IMMUTABLE];
  136. // Output only. The duration of the conversation.
  137. google.protobuf.Duration duration = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  138. // Output only. The number of turns in the conversation.
  139. int32 turn_count = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  140. // Output only. The conversation's latest analysis, if one exists.
  141. Analysis latest_analysis = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  142. // Output only. The annotations that were generated during the customer and agent
  143. // interaction.
  144. repeated RuntimeAnnotation runtime_annotations = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  145. // Output only. All the matched Dialogflow intents in the call. The key corresponds to a
  146. // Dialogflow intent, format:
  147. // projects/{project}/agent/{agent}/intents/{intent}
  148. map<string, DialogflowIntent> dialogflow_intents = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
  149. }
  150. // The analysis resource.
  151. message Analysis {
  152. option (google.api.resource) = {
  153. type: "contactcenterinsights.googleapis.com/Analysis"
  154. pattern: "projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}"
  155. };
  156. // Immutable. The resource name of the analysis.
  157. // Format:
  158. // projects/{project}/locations/{location}/conversations/{conversation}/analyses/{analysis}
  159. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  160. // Output only. The time at which the analysis was requested.
  161. google.protobuf.Timestamp request_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  162. // Output only. The time at which the analysis was created, which occurs when the
  163. // long-running operation completes.
  164. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  165. // Output only. The result of the analysis, which is populated when the analysis
  166. // finishes.
  167. AnalysisResult analysis_result = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  168. }
  169. // The conversation source, which is a combination of transcript and audio.
  170. message ConversationDataSource {
  171. // The source of the conversation.
  172. oneof source {
  173. // A Cloud Storage location specification for the audio and transcript.
  174. GcsSource gcs_source = 1;
  175. // The source when the conversation comes from Dialogflow.
  176. DialogflowSource dialogflow_source = 3;
  177. }
  178. }
  179. // A Cloud Storage source of conversation data.
  180. message GcsSource {
  181. // Cloud Storage URI that points to a file that contains the conversation
  182. // audio.
  183. string audio_uri = 1;
  184. // Immutable. Cloud Storage URI that points to a file that contains the conversation
  185. // transcript.
  186. string transcript_uri = 2 [(google.api.field_behavior) = IMMUTABLE];
  187. }
  188. // A Dialogflow source of conversation data.
  189. message DialogflowSource {
  190. // Output only. The name of the Dialogflow conversation that this conversation
  191. // resource is derived from. Format:
  192. // projects/{project}/locations/{location}/conversations/{conversation}
  193. string dialogflow_conversation = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  194. // Cloud Storage URI that points to a file that contains the conversation
  195. // audio.
  196. string audio_uri = 3;
  197. }
  198. // The result of an analysis.
  199. message AnalysisResult {
  200. // Call-specific metadata created during analysis.
  201. message CallAnalysisMetadata {
  202. // A list of call annotations that apply to this call.
  203. repeated CallAnnotation annotations = 2;
  204. // All the entities in the call.
  205. map<string, Entity> entities = 3;
  206. // Overall conversation-level sentiment for each channel of the call.
  207. repeated ConversationLevelSentiment sentiments = 4;
  208. // All the matched intents in the call.
  209. map<string, Intent> intents = 6;
  210. // All the matched phrase matchers in the call.
  211. map<string, PhraseMatchData> phrase_matchers = 7;
  212. // Overall conversation-level issue modeling result.
  213. IssueModelResult issue_model_result = 8;
  214. }
  215. // Metadata discovered during analysis.
  216. oneof metadata {
  217. // Call-specific metadata created by the analysis.
  218. CallAnalysisMetadata call_analysis_metadata = 2;
  219. }
  220. // The time at which the analysis ended.
  221. google.protobuf.Timestamp end_time = 1;
  222. }
  223. // Issue Modeling result on a conversation.
  224. message IssueModelResult {
  225. // Issue model that generates the result.
  226. string issue_model = 1;
  227. // All the matched issues.
  228. repeated IssueAssignment issues = 2;
  229. }
  230. // One channel of conversation-level sentiment data.
  231. message ConversationLevelSentiment {
  232. // The channel of the audio that the data applies to.
  233. int32 channel_tag = 1;
  234. // Data specifying sentiment.
  235. SentimentData sentiment_data = 2;
  236. }
  237. // Information about the issue.
  238. message IssueAssignment {
  239. // Resource name of the assigned issue.
  240. string issue = 1;
  241. // Score indicating the likelihood of the issue assignment.
  242. // currently bounded on [0,1].
  243. double score = 2;
  244. }
  245. // A piece of metadata that applies to a window of a call.
  246. message CallAnnotation {
  247. // The data in the annotation.
  248. oneof data {
  249. // Data specifying an interruption.
  250. InterruptionData interruption_data = 10;
  251. // Data specifying sentiment.
  252. SentimentData sentiment_data = 11;
  253. // Data specifying silence.
  254. SilenceData silence_data = 12;
  255. // Data specifying a hold.
  256. HoldData hold_data = 13;
  257. // Data specifying an entity mention.
  258. EntityMentionData entity_mention_data = 15;
  259. // Data specifying an intent match.
  260. IntentMatchData intent_match_data = 16;
  261. // Data specifying a phrase match.
  262. PhraseMatchData phrase_match_data = 17;
  263. }
  264. // The channel of the audio where the annotation occurs. For single-channel
  265. // audio, this field is not populated.
  266. int32 channel_tag = 1;
  267. // The boundary in the conversation where the annotation starts, inclusive.
  268. AnnotationBoundary annotation_start_boundary = 4;
  269. // The boundary in the conversation where the annotation ends, inclusive.
  270. AnnotationBoundary annotation_end_boundary = 5;
  271. }
  272. // A point in a conversation that marks the start or the end of an annotation.
  273. message AnnotationBoundary {
  274. // A detailed boundary, which describes a more specific point.
  275. oneof detailed_boundary {
  276. // The word index of this boundary with respect to the first word in the
  277. // transcript piece. This index starts at zero.
  278. int32 word_index = 3;
  279. }
  280. // The index in the sequence of transcribed pieces of the conversation where
  281. // the boundary is located. This index starts at zero.
  282. int32 transcript_index = 1;
  283. }
  284. // The data for an entity annotation.
  285. // Represents a phrase in the conversation that is a known entity, such
  286. // as a person, an organization, or location.
  287. message Entity {
  288. // The type of the entity. For most entity types, the associated metadata is a
  289. // Wikipedia URL (`wikipedia_url`) and Knowledge Graph MID (`mid`). The table
  290. // below lists the associated fields for entities that have different
  291. // metadata.
  292. enum Type {
  293. // Unspecified.
  294. TYPE_UNSPECIFIED = 0;
  295. // Person.
  296. PERSON = 1;
  297. // Location.
  298. LOCATION = 2;
  299. // Organization.
  300. ORGANIZATION = 3;
  301. // Event.
  302. EVENT = 4;
  303. // Artwork.
  304. WORK_OF_ART = 5;
  305. // Consumer product.
  306. CONSUMER_GOOD = 6;
  307. // Other types of entities.
  308. OTHER = 7;
  309. // Phone number.
  310. //
  311. // The metadata lists the phone number (formatted according to local
  312. // convention), plus whichever additional elements appear in the text:
  313. //
  314. // * `number` - The actual number, broken down into sections according to
  315. // local convention.
  316. // * `national_prefix` - Country code, if detected.
  317. // * `area_code` - Region or area code, if detected.
  318. // * `extension` - Phone extension (to be dialed after connection), if
  319. // detected.
  320. PHONE_NUMBER = 9;
  321. // Address.
  322. //
  323. // The metadata identifies the street number and locality plus whichever
  324. // additional elements appear in the text:
  325. //
  326. // * `street_number` - Street number.
  327. // * `locality` - City or town.
  328. // * `street_name` - Street/route name, if detected.
  329. // * `postal_code` - Postal code, if detected.
  330. // * `country` - Country, if detected.
  331. // * `broad_region` - Administrative area, such as the state, if detected.
  332. // * `narrow_region` - Smaller administrative area, such as county, if
  333. // detected.
  334. // * `sublocality` - Used in Asian addresses to demark a district within a
  335. // city, if detected.
  336. ADDRESS = 10;
  337. // Date.
  338. //
  339. // The metadata identifies the components of the date:
  340. //
  341. // * `year` - Four digit year, if detected.
  342. // * `month` - Two digit month number, if detected.
  343. // * `day` - Two digit day number, if detected.
  344. DATE = 11;
  345. // Number.
  346. //
  347. // The metadata is the number itself.
  348. NUMBER = 12;
  349. // Price.
  350. //
  351. // The metadata identifies the `value` and `currency`.
  352. PRICE = 13;
  353. }
  354. // The representative name for the entity.
  355. string display_name = 1;
  356. // The entity type.
  357. Type type = 2;
  358. // Metadata associated with the entity.
  359. //
  360. // For most entity types, the metadata is a Wikipedia URL (`wikipedia_url`)
  361. // and Knowledge Graph MID (`mid`), if they are available. For the metadata
  362. // associated with other entity types, see the Type table below.
  363. map<string, string> metadata = 3;
  364. // The salience score associated with the entity in the [0, 1.0] range.
  365. //
  366. // The salience score for an entity provides information about the
  367. // importance or centrality of that entity to the entire document text.
  368. // Scores closer to 0 are less salient, while scores closer to 1.0 are highly
  369. // salient.
  370. float salience = 4;
  371. // The aggregate sentiment expressed for this entity in the conversation.
  372. SentimentData sentiment = 5;
  373. }
  374. // The data for an intent.
  375. // Represents a detected intent in the conversation, for example MAKES_PROMISE.
  376. message Intent {
  377. // The unique identifier of the intent.
  378. string id = 1;
  379. // The human-readable name of the intent.
  380. string display_name = 2;
  381. }
  382. // The data for a matched phrase matcher.
  383. // Represents information identifying a phrase matcher for a given match.
  384. message PhraseMatchData {
  385. // The unique identifier (the resource name) of the phrase matcher.
  386. string phrase_matcher = 1;
  387. // The human-readable name of the phrase matcher.
  388. string display_name = 2;
  389. }
  390. // The data for a Dialogflow intent.
  391. // Represents a detected intent in the conversation, e.g. MAKES_PROMISE.
  392. message DialogflowIntent {
  393. // The human-readable name of the intent.
  394. string display_name = 1;
  395. }
  396. // The data for an interruption annotation.
  397. message InterruptionData {
  398. }
  399. // The data for a silence annotation.
  400. message SilenceData {
  401. }
  402. // The data for a hold annotation.
  403. message HoldData {
  404. }
  405. // The data for an entity mention annotation.
  406. // This represents a mention of an `Entity` in the conversation.
  407. message EntityMentionData {
  408. // The supported types of mentions.
  409. enum MentionType {
  410. // Unspecified.
  411. MENTION_TYPE_UNSPECIFIED = 0;
  412. // Proper noun.
  413. PROPER = 1;
  414. // Common noun (or noun compound).
  415. COMMON = 2;
  416. }
  417. // The key of this entity in conversation entities.
  418. // Can be used to retrieve the exact `Entity` this mention is attached to.
  419. string entity_unique_id = 1;
  420. // The type of the entity mention.
  421. MentionType type = 2;
  422. // Sentiment expressed for this mention of the entity.
  423. SentimentData sentiment = 3;
  424. }
  425. // The data for an intent match.
  426. // Represents an intent match for a text segment in the conversation. A text
  427. // segment can be part of a sentence, a complete sentence, or an utterance
  428. // with multiple sentences.
  429. message IntentMatchData {
  430. // The id of the matched intent.
  431. // Can be used to retrieve the corresponding intent information.
  432. string intent_unique_id = 1;
  433. }
  434. // The data for a sentiment annotation.
  435. message SentimentData {
  436. // A non-negative number from 0 to infinity which represents the abolute
  437. // magnitude of sentiment regardless of score.
  438. float magnitude = 1;
  439. // The sentiment score between -1.0 (negative) and 1.0 (positive).
  440. float score = 2;
  441. }
  442. // The issue model resource.
  443. message IssueModel {
  444. option (google.api.resource) = {
  445. type: "contactcenterinsights.googleapis.com/IssueModel"
  446. pattern: "projects/{project}/locations/{location}/issueModels/{issue_model}"
  447. };
  448. // State of the model.
  449. enum State {
  450. // Unspecified.
  451. STATE_UNSPECIFIED = 0;
  452. // Model is not deployed but is ready to deploy.
  453. UNDEPLOYED = 1;
  454. // Model is being deployed.
  455. DEPLOYING = 2;
  456. // Model is deployed and is ready to be used. A model can only be used in
  457. // analysis if it's in this state.
  458. DEPLOYED = 3;
  459. // Model is being undeployed.
  460. UNDEPLOYING = 4;
  461. // Model is being deleted.
  462. DELETING = 5;
  463. }
  464. // Immutable. The resource name of the issue model.
  465. // Format:
  466. // projects/{project}/locations/{location}/issueModels/{issue_model}
  467. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  468. // The representative name for the issue model.
  469. string display_name = 2;
  470. // Output only. The time at which this issue model was created.
  471. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  472. // Output only. The most recent time at which the issue model was updated.
  473. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  474. // Output only. State of the model.
  475. State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  476. // Output only. Immutable. The issue model's label statistics on its training data.
  477. IssueModelLabelStats training_stats = 7 [
  478. (google.api.field_behavior) = OUTPUT_ONLY,
  479. (google.api.field_behavior) = IMMUTABLE
  480. ];
  481. }
  482. // The issue resource.
  483. message Issue {
  484. option (google.api.resource) = {
  485. type: "contactcenterinsights.googleapis.com/Issue"
  486. pattern: "projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}"
  487. };
  488. // Immutable. The resource name of the issue.
  489. // Format:
  490. // projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}
  491. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  492. // The representative name for the issue.
  493. string display_name = 2;
  494. // Output only. The time at which this issue was created.
  495. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  496. // Output only. The most recent time that this issue was updated.
  497. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  498. }
  499. // Aggregated statistics about an issue model.
  500. message IssueModelLabelStats {
  501. // Aggregated statistics about an issue.
  502. message IssueStats {
  503. // Issue resource.
  504. // Format:
  505. // projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}
  506. string issue = 1;
  507. // Number of conversations attached to the issue at this point in time.
  508. int64 labeled_conversations_count = 2;
  509. }
  510. // Number of conversations the issue model has analyzed at this point in time.
  511. int64 analyzed_conversations_count = 1;
  512. // Number of analyzed conversations for which no issue was applicable at this
  513. // point in time.
  514. int64 unclassified_conversations_count = 2;
  515. // Statistics on each issue. Key is the issue's resource name.
  516. map<string, IssueStats> issue_stats = 3;
  517. }
  518. // The phrase matcher resource.
  519. message PhraseMatcher {
  520. option (google.api.resource) = {
  521. type: "contactcenterinsights.googleapis.com/PhraseMatcher"
  522. pattern: "projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}"
  523. };
  524. // Specifies how to combine each phrase match rule group to determine whether
  525. // there is a match.
  526. enum PhraseMatcherType {
  527. // Unspecified.
  528. PHRASE_MATCHER_TYPE_UNSPECIFIED = 0;
  529. // Must meet all phrase match rule groups or there is no match.
  530. ALL_OF = 1;
  531. // If any of the phrase match rule groups are met, there is a match.
  532. ANY_OF = 2;
  533. }
  534. // The resource name of the phrase matcher.
  535. // Format:
  536. // projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}
  537. string name = 1;
  538. // Output only. Immutable. The revision ID of the phrase matcher.
  539. // A new revision is committed whenever the matcher is changed, except when it
  540. // is activated or deactivated. A server generated random ID will be used.
  541. // Example: locations/global/phraseMatchers/my-first-matcher@1234567
  542. string revision_id = 2 [
  543. (google.api.field_behavior) = IMMUTABLE,
  544. (google.api.field_behavior) = OUTPUT_ONLY
  545. ];
  546. // The customized version tag to use for the phrase matcher. If not specified,
  547. // it will default to `revision_id`.
  548. string version_tag = 3;
  549. // Output only. The timestamp of when the revision was created. It is also the create time
  550. // when a new matcher is added.
  551. google.protobuf.Timestamp revision_create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  552. // The human-readable name of the phrase matcher.
  553. string display_name = 5;
  554. // Required. The type of this phrase matcher.
  555. PhraseMatcherType type = 6 [(google.api.field_behavior) = REQUIRED];
  556. // Applies the phrase matcher only when it is active.
  557. bool active = 7;
  558. // A list of phase match rule groups that are included in this matcher.
  559. repeated PhraseMatchRuleGroup phrase_match_rule_groups = 8;
  560. // Output only. The most recent time at which the activation status was updated.
  561. google.protobuf.Timestamp activation_update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  562. // The role whose utterances the phrase matcher should be matched
  563. // against. If the role is ROLE_UNSPECIFIED it will be matched against any
  564. // utterances in the transcript.
  565. ConversationParticipant.Role role_match = 10;
  566. }
  567. // A message representing a rule in the phrase matcher.
  568. message PhraseMatchRuleGroup {
  569. // Specifies how to combine each phrase match rule for whether there is a
  570. // match.
  571. enum PhraseMatchRuleGroupType {
  572. // Unspecified.
  573. PHRASE_MATCH_RULE_GROUP_TYPE_UNSPECIFIED = 0;
  574. // Must meet all phrase match rules or there is no match.
  575. ALL_OF = 1;
  576. // If any of the phrase match rules are met, there is a match.
  577. ANY_OF = 2;
  578. }
  579. // Required. The type of this phrase match rule group.
  580. PhraseMatchRuleGroupType type = 1 [(google.api.field_behavior) = REQUIRED];
  581. // A list of phase match rules that are included in this group.
  582. repeated PhraseMatchRule phrase_match_rules = 2;
  583. }
  584. // The data for a phrase match rule.
  585. message PhraseMatchRule {
  586. // Required. The phrase to be matched.
  587. string query = 1 [(google.api.field_behavior) = REQUIRED];
  588. // Specifies whether the phrase must be missing from the transcript segment or
  589. // present in the transcript segment.
  590. bool negated = 2;
  591. // Provides additional information about the rule that specifies how to apply
  592. // the rule.
  593. PhraseMatchRuleConfig config = 3;
  594. }
  595. // Configuration information of a phrase match rule.
  596. message PhraseMatchRuleConfig {
  597. // The configuration of the phrase match rule.
  598. oneof config {
  599. // The configuration for the exact match rule.
  600. ExactMatchConfig exact_match_config = 1;
  601. }
  602. }
  603. // Exact match configuration.
  604. message ExactMatchConfig {
  605. // Whether to consider case sensitivity when performing an exact match.
  606. bool case_sensitive = 1;
  607. }
  608. // The settings resource.
  609. message Settings {
  610. option (google.api.resource) = {
  611. type: "contactcenterinsights.googleapis.com/Settings"
  612. pattern: "projects/{project}/locations/{location}/settings"
  613. };
  614. // Default configuration when creating Analyses in Insights.
  615. message AnalysisConfig {
  616. // Percentage of conversations created using Dialogflow runtime integration
  617. // to analyze automatically, between [0, 100].
  618. double runtime_integration_analysis_percentage = 1;
  619. }
  620. // Immutable. The resource name of the settings resource.
  621. // Format:
  622. // projects/{project}/locations/{location}/settings
  623. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  624. // Output only. The time at which the settings was created.
  625. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  626. // Output only. The time at which the settings were last updated.
  627. google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  628. // A language code to be applied to each transcript segment unless the segment
  629. // already specifies a language code. Language code defaults to "en-US" if it
  630. // is neither specified on the segment nor here.
  631. string language_code = 4;
  632. // The default TTL for newly-created conversations. If a conversation has a
  633. // specified expiration, that value will be used instead. Changing this
  634. // value will not change the expiration of existing conversations.
  635. // Conversations with no expire time persist until they are deleted.
  636. google.protobuf.Duration conversation_ttl = 5;
  637. // A map that maps a notification trigger to a Pub/Sub topic. Each time a
  638. // specified trigger occurs, Insights will notify the corresponding Pub/Sub
  639. // topic.
  640. //
  641. // Keys are notification triggers. Supported keys are:
  642. //
  643. // * "all-triggers": Notify each time any of the supported triggers occurs.
  644. // * "create-analysis": Notify each time an analysis is created.
  645. // * "create-conversation": Notify each time a conversation is created.
  646. // * "export-insights-data": Notify each time an export is complete.
  647. //
  648. // Values are Pub/Sub topics. The format of each Pub/Sub topic is:
  649. // projects/{project}/topics/{topic}
  650. map<string, string> pubsub_notification_settings = 6;
  651. // Default analysis settings.
  652. AnalysisConfig analysis_config = 7;
  653. }
  654. // An annotation that was generated during the customer and agent interaction.
  655. message RuntimeAnnotation {
  656. // The data in the annotation.
  657. oneof data {
  658. // Agent Assist Article Suggestion data.
  659. ArticleSuggestionData article_suggestion = 6;
  660. // Agent Assist FAQ answer data.
  661. FaqAnswerData faq_answer = 7;
  662. // Agent Assist Smart Reply data.
  663. SmartReplyData smart_reply = 8;
  664. // Agent Assist Smart Compose suggestion data.
  665. SmartComposeSuggestionData smart_compose_suggestion = 9;
  666. // Dialogflow interaction data.
  667. DialogflowInteractionData dialogflow_interaction = 10;
  668. }
  669. // The unique identifier of the annotation.
  670. // Format:
  671. // projects/{project}/locations/{location}/conversationDatasets/{dataset}/conversationDataItems/{data_item}/conversationAnnotations/{annotation}
  672. string annotation_id = 1;
  673. // The time at which this annotation was created.
  674. google.protobuf.Timestamp create_time = 2;
  675. // The boundary in the conversation where the annotation starts, inclusive.
  676. AnnotationBoundary start_boundary = 3;
  677. // The boundary in the conversation where the annotation ends, inclusive.
  678. AnnotationBoundary end_boundary = 4;
  679. // The feedback that the customer has about the answer in `data`.
  680. AnswerFeedback answer_feedback = 5;
  681. }
  682. // The feedback that the customer has about a certain answer in the
  683. // conversation.
  684. message AnswerFeedback {
  685. // The correctness level of an answer.
  686. enum CorrectnessLevel {
  687. // Correctness level unspecified.
  688. CORRECTNESS_LEVEL_UNSPECIFIED = 0;
  689. // Answer is totally wrong.
  690. NOT_CORRECT = 1;
  691. // Answer is partially correct.
  692. PARTIALLY_CORRECT = 2;
  693. // Answer is fully correct.
  694. FULLY_CORRECT = 3;
  695. }
  696. // The correctness level of an answer.
  697. CorrectnessLevel correctness_level = 1;
  698. // Indicates whether an answer or item was clicked by the human agent.
  699. bool clicked = 2;
  700. // Indicates whether an answer or item was displayed to the human agent in the
  701. // agent desktop UI.
  702. bool displayed = 3;
  703. }
  704. // Agent Assist Article Suggestion data.
  705. message ArticleSuggestionData {
  706. // Article title.
  707. string title = 1;
  708. // Article URI.
  709. string uri = 2;
  710. // The system's confidence score that this article is a good match for this
  711. // conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely
  712. // certain).
  713. float confidence_score = 3;
  714. // Map that contains metadata about the Article Suggestion and the document
  715. // that it originates from.
  716. map<string, string> metadata = 4;
  717. // Name of the query record.
  718. // Format:
  719. // projects/{project}/locations/{location}/queryRecords/{query_record}
  720. string query_record = 5;
  721. // The knowledge document that this answer was extracted from.
  722. // Format:
  723. // projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}
  724. string source = 6;
  725. }
  726. // Agent Assist frequently-asked-question answer data.
  727. message FaqAnswerData {
  728. // The piece of text from the `source` knowledge base document.
  729. string answer = 1;
  730. // The system's confidence score that this answer is a good match for this
  731. // conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely
  732. // certain).
  733. float confidence_score = 2;
  734. // The corresponding FAQ question.
  735. string question = 3;
  736. // Map that contains metadata about the FAQ answer and the document that
  737. // it originates from.
  738. map<string, string> metadata = 4;
  739. // Name of the query record.
  740. // Format:
  741. // projects/{project}/locations/{location}/queryRecords/{query_record}.
  742. string query_record = 5;
  743. // The knowledge document that this answer was extracted from.
  744. // Format:
  745. // projects/{project}/knowledgeBases/{knowledge_base}/documents/{document}.
  746. string source = 6;
  747. }
  748. // Agent Assist Smart Reply data.
  749. message SmartReplyData {
  750. // The content of the reply.
  751. string reply = 1;
  752. // The system's confidence score that this reply is a good match for this
  753. // conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely
  754. // certain).
  755. double confidence_score = 2;
  756. // Map that contains metadata about the Smart Reply and the document from
  757. // which it originates.
  758. map<string, string> metadata = 3;
  759. // Name of the query record.
  760. // Format:
  761. // projects/{project}/locations/{location}/queryRecords/{query_record}
  762. string query_record = 4;
  763. }
  764. // Agent Assist Smart Compose suggestion data.
  765. message SmartComposeSuggestionData {
  766. // The content of the suggestion.
  767. string suggestion = 1;
  768. // The system's confidence score that this suggestion is a good match for this
  769. // conversation, ranging from 0.0 (completely uncertain) to 1.0 (completely
  770. // certain).
  771. double confidence_score = 2;
  772. // Map that contains metadata about the Smart Compose suggestion and the
  773. // document from which it originates.
  774. map<string, string> metadata = 3;
  775. // Name of the query record.
  776. // Format:
  777. // projects/{project}/locations/{location}/queryRecords/{query_record}
  778. string query_record = 4;
  779. }
  780. // Dialogflow interaction data.
  781. message DialogflowInteractionData {
  782. // The Dialogflow intent resource path. Format:
  783. // projects/{project}/agent/{agent}/intents/{intent}
  784. string dialogflow_intent_id = 1;
  785. // The confidence of the match ranging from 0.0 (completely uncertain) to 1.0
  786. // (completely certain).
  787. float confidence = 2;
  788. }
  789. // The call participant speaking for a given utterance.
  790. message ConversationParticipant {
  791. // The role of the participant.
  792. enum Role {
  793. // Participant's role is not set.
  794. ROLE_UNSPECIFIED = 0;
  795. // Participant is a human agent.
  796. HUMAN_AGENT = 1;
  797. // Participant is an automated agent.
  798. AUTOMATED_AGENT = 2;
  799. // Participant is an end user who conversed with the contact center.
  800. END_USER = 3;
  801. // Participant is either a human or automated agent.
  802. ANY_AGENT = 4;
  803. }
  804. // The name of the Dialogflow participant. Format:
  805. // projects/{project}/locations/{location}/conversations/{conversation}/participants/{participant}
  806. string dialogflow_participant = 1;
  807. // The role of the participant.
  808. Role role = 2;
  809. }