Skip to main content

auto_labeling_rules

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

Overview

Nameauto_labeling_rules
TypeResource
Idgoogle.contactcenterinsights.auto_labeling_rules

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringIdentifier. The resource name of the auto-labeling rule. Format: projects/{project}/locations/{location}/autoLabelingRules/{auto_labeling_rule}
activebooleanWhether the rule is active.
conditionsarrayConditions to apply for auto-labeling the label_key. Representing sequential block of if .. else if .. else statements. The value of the first matching condition will be used.
createTimestring (google-datetime)Output only. The time at which this rule was created.
descriptionstringThe description of the rule.
displayNamestringThe user-provided display name of the rule.
labelKeystringThe label key. This is also the {auto_labeling_rule} in the resource name. Only settable if label_key_type is LABEL_KEY_TYPE_CUSTOM.
labelKeyTypestringThe type of the label key. (LABEL_KEY_TYPE_UNSPECIFIED, LABEL_KEY_TYPE_CUSTOM)
updateTimestring (google-datetime)Output only. The most recent time at which the rule was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, autoLabelingRulesIdGets an auto labeling rule.
listselectprojectsId, locationsIdpageSize, pageTokenLists auto labeling rules.
createinsertprojectsId, locationsIdautoLabelingRuleIdCreates an auto labeling rule.
patchupdateprojectsId, locationsId, autoLabelingRulesIdupdateMaskUpdates an auto labeling rule.
deletedeleteprojectsId, locationsId, autoLabelingRulesIdDeletes an auto labeling rule.
testexecprojectsId, locationsIdTests auto labeling rules against a conversation.

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
autoLabelingRulesIdstring
locationsIdstring
projectsIdstring
autoLabelingRuleIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets an auto labeling rule.

SELECT
name,
active,
conditions,
createTime,
description,
displayName,
labelKey,
labelKeyType,
updateTime
FROM google.contactcenterinsights.auto_labeling_rules
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND autoLabelingRulesId = '{{ autoLabelingRulesId }}' -- required
;

INSERT examples

Creates an auto labeling rule.

INSERT INTO google.contactcenterinsights.auto_labeling_rules (
data__description,
data__active,
data__labelKeyType,
data__labelKey,
data__name,
data__conditions,
data__displayName,
projectsId,
locationsId,
autoLabelingRuleId
)
SELECT
'{{ description }}',
{{ active }},
'{{ labelKeyType }}',
'{{ labelKey }}',
'{{ name }}',
'{{ conditions }}',
'{{ displayName }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ autoLabelingRuleId }}'
RETURNING
name,
active,
conditions,
createTime,
description,
displayName,
labelKey,
labelKeyType,
updateTime
;

UPDATE examples

Updates an auto labeling rule.

UPDATE google.contactcenterinsights.auto_labeling_rules
SET
data__description = '{{ description }}',
data__active = {{ active }},
data__labelKeyType = '{{ labelKeyType }}',
data__labelKey = '{{ labelKey }}',
data__name = '{{ name }}',
data__conditions = '{{ conditions }}',
data__displayName = '{{ displayName }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND autoLabelingRulesId = '{{ autoLabelingRulesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
active,
conditions,
createTime,
description,
displayName,
labelKey,
labelKeyType,
updateTime;

DELETE examples

Deletes an auto labeling rule.

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

Lifecycle Methods

Tests auto labeling rules against a conversation.

EXEC google.contactcenterinsights.auto_labeling_rules.test
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"conversation": "{{ conversation }}",
"autoLabelingRule": "{{ autoLabelingRule }}"
}'
;