phrase_matchers
Creates, updates, deletes, gets or lists a phrase_matchers
resource.
Overview
Name | phrase_matchers |
Type | Resource |
Id | google.contactcenterinsights.phrase_matchers |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the phrase matcher. Format: projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} |
activationUpdateTime | string (google-datetime) | Output only. The most recent time at which the activation status was updated. |
active | boolean | Applies the phrase matcher only when it is active. |
displayName | string | The human-readable name of the phrase matcher. |
phraseMatchRuleGroups | array | A list of phase match rule groups that are included in this matcher. |
revisionCreateTime | string (google-datetime) | Output only. The timestamp of when the revision was created. It is also the create time when a new matcher is added. |
revisionId | string | Output only. Immutable. The revision ID of the phrase matcher. A new revision is committed whenever the matcher is changed, except when it is activated or deactivated. A server generated random ID will be used. Example: locations/global/phraseMatchers/my-first-matcher@1234567 |
roleMatch | string | The role whose utterances the phrase matcher should be matched against. If the role is ROLE_UNSPECIFIED it will be matched against any utterances in the transcript. |
type | string | Required. The type of this phrase matcher. |
updateTime | string (google-datetime) | Output only. The most recent time at which the phrase matcher was updated. |
versionTag | string | The customized version tag to use for the phrase matcher. If not specified, it will default to revision_id . |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the phrase matcher. Format: projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} |
activationUpdateTime | string (google-datetime) | Output only. The most recent time at which the activation status was updated. |
active | boolean | Applies the phrase matcher only when it is active. |
displayName | string | The human-readable name of the phrase matcher. |
phraseMatchRuleGroups | array | A list of phase match rule groups that are included in this matcher. |
revisionCreateTime | string (google-datetime) | Output only. The timestamp of when the revision was created. It is also the create time when a new matcher is added. |
revisionId | string | Output only. Immutable. The revision ID of the phrase matcher. A new revision is committed whenever the matcher is changed, except when it is activated or deactivated. A server generated random ID will be used. Example: locations/global/phraseMatchers/my-first-matcher@1234567 |
roleMatch | string | The role whose utterances the phrase matcher should be matched against. If the role is ROLE_UNSPECIFIED it will be matched against any utterances in the transcript. |
type | string | Required. The type of this phrase matcher. |
updateTime | string (google-datetime) | Output only. The most recent time at which the phrase matcher was updated. |
versionTag | string | The customized version tag to use for the phrase matcher. If not specified, it will default to revision_id . |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , phraseMatchersId | Gets a phrase matcher. | |
list | select | projectsId , locationsId | pageSize , pageToken , filter | Lists phrase matchers. |
create | insert | projectsId , locationsId | Creates a phrase matcher. | |
patch | update | projectsId , locationsId , phraseMatchersId | updateMask | Updates a phrase matcher. |
delete | delete | projectsId , locationsId , phraseMatchersId | Deletes a phrase matcher. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
phraseMatchersId | string | |
projectsId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets a phrase matcher.
SELECT
name,
activationUpdateTime,
active,
displayName,
phraseMatchRuleGroups,
revisionCreateTime,
revisionId,
roleMatch,
type,
updateTime,
versionTag
FROM google.contactcenterinsights.phrase_matchers
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND phraseMatchersId = '{{ phraseMatchersId }}' -- required;
Lists phrase matchers.
SELECT
name,
activationUpdateTime,
active,
displayName,
phraseMatchRuleGroups,
revisionCreateTime,
revisionId,
roleMatch,
type,
updateTime,
versionTag
FROM google.contactcenterinsights.phrase_matchers
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND filter = '{{ filter }}';
INSERT
examples
- create
- Manifest
Creates a phrase matcher.
INSERT INTO google.contactcenterinsights.phrase_matchers (
data__name,
data__versionTag,
data__displayName,
data__type,
data__active,
data__phraseMatchRuleGroups,
data__roleMatch,
projectsId,
locationsId
)
SELECT
'{{ name }}',
'{{ versionTag }}',
'{{ displayName }}',
'{{ type }}',
{{ active }},
'{{ phraseMatchRuleGroups }}',
'{{ roleMatch }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
activationUpdateTime,
active,
displayName,
phraseMatchRuleGroups,
revisionCreateTime,
revisionId,
roleMatch,
type,
updateTime,
versionTag
;
# Description fields are for documentation purposes
- name: phrase_matchers
props:
- name: projectsId
value: string
description: Required parameter for the phrase_matchers resource.
- name: locationsId
value: string
description: Required parameter for the phrase_matchers resource.
- name: name
value: string
description: >
The resource name of the phrase matcher. Format: projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher}
- name: versionTag
value: string
description: >
The customized version tag to use for the phrase matcher. If not specified, it will default to `revision_id`.
- name: displayName
value: string
description: >
The human-readable name of the phrase matcher.
- name: type
value: string
description: >
Required. The type of this phrase matcher.
valid_values: ['PHRASE_MATCHER_TYPE_UNSPECIFIED', 'ALL_OF', 'ANY_OF']
- name: active
value: boolean
description: >
Applies the phrase matcher only when it is active.
- name: phraseMatchRuleGroups
value: array
description: >
A list of phase match rule groups that are included in this matcher.
- name: roleMatch
value: string
description: >
The role whose utterances the phrase matcher should be matched against. If the role is ROLE_UNSPECIFIED it will be matched against any utterances in the transcript.
valid_values: ['ROLE_UNSPECIFIED', 'HUMAN_AGENT', 'AUTOMATED_AGENT', 'END_USER', 'ANY_AGENT']
UPDATE
examples
- patch
Updates a phrase matcher.
UPDATE google.contactcenterinsights.phrase_matchers
SET
data__name = '{{ name }}',
data__versionTag = '{{ versionTag }}',
data__displayName = '{{ displayName }}',
data__type = '{{ type }}',
data__active = {{ active }},
data__phraseMatchRuleGroups = '{{ phraseMatchRuleGroups }}',
data__roleMatch = '{{ roleMatch }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND phraseMatchersId = '{{ phraseMatchersId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
activationUpdateTime,
active,
displayName,
phraseMatchRuleGroups,
revisionCreateTime,
revisionId,
roleMatch,
type,
updateTime,
versionTag;
DELETE
examples
- delete
Deletes a phrase matcher.
DELETE FROM google.contactcenterinsights.phrase_matchers
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND phraseMatchersId = '{{ phraseMatchersId }}' --required;