Skip to main content

analysis_rules

Creates, updates, deletes, gets or lists an analysis_rules resource.

Overview

Nameanalysis_rules
TypeResource
Idgoogle.contactcenterinsights.analysis_rules

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name of the analysis rule. Format: projects/{project}/locations/{location}/analysisRules/{analysis_rule}
activebooleanIf true, apply this rule to conversations. Otherwise, this rule is inactive and saved as a draft.
analysisPercentagenumber (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.
annotatorSelectorobjectSelector 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)
conversationFilterstringFilter 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.
createTimestring (google-datetime)Output only. The time at which this analysis rule was created.
displayNamestringDisplay Name of the analysis rule.
updateTimestring (google-datetime)Output only. The most recent time at which this analysis rule was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, analysisRulesIdGet a analysis rule.
listselectprojectsId, locationsIdpageSize, pageTokenLists analysis rules.
createinsertprojectsId, locationsIdCreates a analysis rule.
patchupdateprojectsId, locationsId, analysisRulesIdupdateMaskUpdates a analysis rule.
deletedeleteprojectsId, locationsId, analysisRulesIdDeletes 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.

NameDatatypeDescription
analysisRulesIdstring
locationsIdstring
projectsIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

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;

INSERT examples

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
;

UPDATE examples

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

Deletes a analysis rule.

DELETE FROM google.contactcenterinsights.analysis_rules
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND analysisRulesId = '{{ analysisRulesId }}' --required;