Skip to content

Commit

Permalink
feat: [google-cloud-contact-center-insights] add Conversation Quality…
Browse files Browse the repository at this point in the history
…Metadata (#12224)

- [ ] Regenerate this pull request now.

BEGIN_COMMIT_OVERRIDE
feat: Add Conversation QualityMetadata
docs: Clarify usage of agent and customer channel fields in
IngestConversationsRequest
END_COMMIT_OVERRIDE



PiperOrigin-RevId: 601446672

Source-Link:
googleapis/googleapis@6f0527b

Source-Link:
https://github.com/googleapis/googleapis-gen/commit/5678b00d61bed0bac64a63725d276eacd980b04a
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRhY3QtY2VudGVyLWluc2lnaHRzLy5Pd2xCb3QueWFtbCIsImgiOiI1Njc4YjAwZDYxYmVkMGJhYzY0YTYzNzI1ZDI3NmVhY2Q5ODBiMDRhIn0=

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Jan 25, 2024
1 parent dea3367 commit 7e81f5b
Show file tree
Hide file tree
Showing 7 changed files with 135 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.15.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.15.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -684,17 +684,15 @@ class ConversationConfig(proto.Message):
An opaque, user-specified string representing
the human agent who handled the conversations.
agent_channel (int):
Optional. For audio conversations, this field
indicates which of the channels, 1 or 2,
contains the agent. Note that this must be set
for audio conversations to be properly displayed
Optional. Indicates which of the channels, 1
or 2, contains the agent. Note that this must be
set for conversations to be properly displayed
and analyzed.
customer_channel (int):
Optional. For audio conversations, this field
indicates which of the channels, 1 or 2,
contains the customer. Note that this must be
set for audio conversations to be properly
displayed and analyzed.
Optional. Indicates which of the channels, 1
or 2, contains the agent. Note that this must be
set for conversations to be properly displayed
and analyzed.
"""

agent_id: str = proto.Field(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ class Conversation(proto.Message):
fields. A maximum of 20 labels per conversation
is allowed, with a maximum of 256 characters per
entry.
quality_metadata (google.cloud.contact_center_insights_v1.types.Conversation.QualityMetadata):
Conversation metadata related to quality
management.
transcript (google.cloud.contact_center_insights_v1.types.Conversation.Transcript):
Output only. The conversation transcript.
medium (google.cloud.contact_center_insights_v1.types.Conversation.Medium):
Expand Down Expand Up @@ -194,6 +197,79 @@ class CallMetadata(proto.Message):
number=2,
)

class QualityMetadata(proto.Message):
r"""Conversation metadata related to quality management.
Attributes:
customer_satisfaction_rating (int):
An arbitrary integer value indicating the
customer's satisfaction rating.
wait_duration (google.protobuf.duration_pb2.Duration):
The amount of time the customer waited to
connect with an agent.
menu_path (str):
An arbitrary string value specifying the menu
path the customer took.
agent_info (MutableSequence[google.cloud.contact_center_insights_v1.types.Conversation.QualityMetadata.AgentInfo]):
Information about agents involved in the
call.
"""

class AgentInfo(proto.Message):
r"""Information about an agent involved in the conversation.
Attributes:
agent_id (str):
A user-specified string representing the
agent.
display_name (str):
The agent's name.
team (str):
A user-specified string representing the
agent's team.
disposition_code (str):
A user-provided string indicating the outcome
of the agent's segment of the call.
"""

agent_id: str = proto.Field(
proto.STRING,
number=1,
)
display_name: str = proto.Field(
proto.STRING,
number=2,
)
team: str = proto.Field(
proto.STRING,
number=3,
)
disposition_code: str = proto.Field(
proto.STRING,
number=4,
)

customer_satisfaction_rating: int = proto.Field(
proto.INT32,
number=1,
)
wait_duration: duration_pb2.Duration = proto.Field(
proto.MESSAGE,
number=2,
message=duration_pb2.Duration,
)
menu_path: str = proto.Field(
proto.STRING,
number=3,
)
agent_info: MutableSequence[
"Conversation.QualityMetadata.AgentInfo"
] = proto.RepeatedField(
proto.MESSAGE,
number=4,
message="Conversation.QualityMetadata.AgentInfo",
)

class Transcript(proto.Message):
r"""A message representing the transcript of a conversation.
Expand Down Expand Up @@ -401,6 +477,11 @@ class DialogflowSegmentMetadata(proto.Message):
proto.STRING,
number=6,
)
quality_metadata: QualityMetadata = proto.Field(
proto.MESSAGE,
number=24,
message=QualityMetadata,
)
transcript: Transcript = proto.Field(
proto.MESSAGE,
number=8,
Expand Down
18 changes: 18 additions & 0 deletions packages/google-cloud-contact-center-insights/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,15 @@ def docs(session):

session.install("-e", ".")
session.install(
# We need to pin to specific versions of the `sphinxcontrib-*` packages
# which still support sphinx 4.x.
# See https://github.com/googleapis/sphinx-docfx-yaml/issues/344
# and https://github.com/googleapis/sphinx-docfx-yaml/issues/345.
"sphinxcontrib-applehelp==1.0.4",
"sphinxcontrib-devhelp==1.0.2",
"sphinxcontrib-htmlhelp==2.0.1",
"sphinxcontrib-qthelp==1.0.3",
"sphinxcontrib-serializinghtml==1.1.5",
"sphinx==4.5.0",
"alabaster",
"recommonmark",
Expand All @@ -308,6 +317,15 @@ def docfx(session):

session.install("-e", ".")
session.install(
# We need to pin to specific versions of the `sphinxcontrib-*` packages
# which still support sphinx 4.x.
# See https://github.com/googleapis/sphinx-docfx-yaml/issues/344
# and https://github.com/googleapis/sphinx-docfx-yaml/issues/345.
"sphinxcontrib-applehelp==1.0.4",
"sphinxcontrib-devhelp==1.0.2",
"sphinxcontrib-htmlhelp==2.0.1",
"sphinxcontrib-qthelp==1.0.3",
"sphinxcontrib-serializinghtml==1.1.5",
"gcp-sphinx-docfx-yaml",
"alabaster",
"recommonmark",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-contact-center-insights",
"version": "1.15.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11103,6 +11103,19 @@ def test_create_conversation_rest(request_type):
"language_code": "language_code_value",
"agent_id": "agent_id_value",
"labels": {},
"quality_metadata": {
"customer_satisfaction_rating": 3005,
"wait_duration": {},
"menu_path": "menu_path_value",
"agent_info": [
{
"agent_id": "agent_id_value",
"display_name": "display_name_value",
"team": "team_value",
"disposition_code": "disposition_code_value",
}
],
},
"transcript": {
"transcript_segments": [
{
Expand Down Expand Up @@ -11873,6 +11886,19 @@ def test_update_conversation_rest(request_type):
"language_code": "language_code_value",
"agent_id": "agent_id_value",
"labels": {},
"quality_metadata": {
"customer_satisfaction_rating": 3005,
"wait_duration": {},
"menu_path": "menu_path_value",
"agent_info": [
{
"agent_id": "agent_id_value",
"display_name": "display_name_value",
"team": "team_value",
"disposition_code": "disposition_code_value",
}
],
},
"transcript": {
"transcript_segments": [
{
Expand Down

0 comments on commit 7e81f5b

Please sign in to comment.