analysis_rules
Creates, updates, deletes, gets or lists an analysis_rules
resource.
Overview
Name | analysis_rules |
Type | Resource |
Id | google.contactcenterinsights.analysis_rules |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the analysis rule. Format: projects/{project}/locations/{location}/analysisRules/{analysis_rule} |
active | boolean | If true, apply this rule to conversations. Otherwise, this rule is inactive and saved as a draft. |
analysisPercentage | number (double) | Percentage of conversations that we should apply this analysis setting automatically, between [0, 1]. For example, 0.1 means 10%. Conversations are sampled in a determenestic way. The original runtime_percentage & upload percentage will be replaced by defining filters on the conversation. |
annotatorSelector | object | Selector of annotators to run and the phrase matchers to use for conversations that matches the conversation_filter. If not specified, NO annotators will be run. (id: GoogleCloudContactcenterinsightsV1AnnotatorSelector) |
conversationFilter | string | Filter for the conversations that should apply this analysis rule. An empty filter means this analysis rule applies to all conversations. Refer to https://cloud.google.com/contact-center/insights/docs/filtering for details. |
createTime | string (google-datetime) | Output only. The time at which this analysis rule was created. |
displayName | string | Display Name of the analysis rule. |
updateTime | string (google-datetime) | Output only. The most recent time at which this analysis rule was updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the analysis rule. Format: projects/{project}/locations/{location}/analysisRules/{analysis_rule} |
active | boolean | If true, apply this rule to conversations. Otherwise, this rule is inactive and saved as a draft. |
analysisPercentage | number (double) | Percentage of conversations that we should apply this analysis setting automatically, between [0, 1]. For example, 0.1 means 10%. Conversations are sampled in a determenestic way. The original runtime_percentage & upload percentage will be replaced by defining filters on the conversation. |
annotatorSelector | object | Selector of annotators to run and the phrase matchers to use for conversations that matches the conversation_filter. If not specified, NO annotators will be run. (id: GoogleCloudContactcenterinsightsV1AnnotatorSelector) |
conversationFilter | string | Filter for the conversations that should apply this analysis rule. An empty filter means this analysis rule applies to all conversations. Refer to https://cloud.google.com/contact-center/insights/docs/filtering for details. |
createTime | string (google-datetime) | Output only. The time at which this analysis rule was created. |
displayName | string | Display Name of the analysis rule. |
updateTime | string (google-datetime) | Output only. The most recent time at which this analysis rule was updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , analysisRulesId | Get a analysis rule. | |
list | select | projectsId , locationsId | pageSize , pageToken | Lists analysis rules. |
create | insert | projectsId , locationsId | Creates a analysis rule. | |
patch | update | projectsId , locationsId , analysisRulesId | updateMask | Updates a analysis rule. |
delete | delete | projectsId , locationsId , analysisRulesId | Deletes a analysis rule. |
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 |
---|---|---|
analysisRulesId | string | |
locationsId | string | |
projectsId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Get a analysis rule.
SELECT
name,
active,
analysisPercentage,
annotatorSelector,
conversationFilter,
createTime,
displayName,
updateTime
FROM google.contactcenterinsights.analysis_rules
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND analysisRulesId = '{{ analysisRulesId }}' -- required;
Lists analysis rules.
SELECT
name,
active,
analysisPercentage,
annotatorSelector,
conversationFilter,
createTime,
displayName,
updateTime
FROM google.contactcenterinsights.analysis_rules
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Creates a analysis rule.
INSERT INTO google.contactcenterinsights.analysis_rules (
data__name,
data__displayName,
data__conversationFilter,
data__annotatorSelector,
data__analysisPercentage,
data__active,
projectsId,
locationsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ conversationFilter }}',
'{{ annotatorSelector }}',
{{ analysisPercentage }},
{{ active }},
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
active,
analysisPercentage,
annotatorSelector,
conversationFilter,
createTime,
displayName,
updateTime
;
# Description fields are for documentation purposes
- name: analysis_rules
props:
- name: projectsId
value: string
description: Required parameter for the analysis_rules resource.
- name: locationsId
value: string
description: Required parameter for the analysis_rules resource.
- name: name
value: string
description: >
Identifier. The resource name of the analysis rule. Format: projects/{project}/locations/{location}/analysisRules/{analysis_rule}
- name: displayName
value: string
description: >
Display Name of the analysis rule.
- name: conversationFilter
value: string
description: >
Filter for the conversations that should apply this analysis rule. An empty filter means this analysis rule applies to all conversations. Refer to https://cloud.google.com/contact-center/insights/docs/filtering for details.
- name: annotatorSelector
value: object
description: >
Selector of annotators to run and the phrase matchers to use for conversations that matches the conversation_filter. If not specified, NO annotators will be run.
- name: analysisPercentage
value: number
description: >
Percentage of conversations that we should apply this analysis setting automatically, between [0, 1]. For example, 0.1 means 10%. Conversations are sampled in a determenestic way. The original runtime_percentage & upload percentage will be replaced by defining filters on the conversation.
- name: active
value: boolean
description: >
If true, apply this rule to conversations. Otherwise, this rule is inactive and saved as a draft.
UPDATE
examples
- patch
Updates a analysis rule.
UPDATE google.contactcenterinsights.analysis_rules
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__conversationFilter = '{{ conversationFilter }}',
data__annotatorSelector = '{{ annotatorSelector }}',
data__analysisPercentage = {{ analysisPercentage }},
data__active = {{ active }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND analysisRulesId = '{{ analysisRulesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
active,
analysisPercentage,
annotatorSelector,
conversationFilter,
createTime,
displayName,
updateTime;
DELETE
examples
- delete
Deletes a analysis rule.
DELETE FROM google.contactcenterinsights.analysis_rules
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND analysisRulesId = '{{ analysisRulesId }}' --required;