REST Resource: brands.agents

Resource: Agent

A conversational entity that represents a brand.

JSON representation
{
  "name": string,
  "displayName": string,

  // Union field detail_info can be only one of the following:
  "verifiedSmsAgent": {
    object (VerifiedSmsAgent)
  },
  "businessMessagesAgent": {
    object (BusinessMessagesAgent)
  },
  "verifiedCallsAgent": {
    object (VerifiedCallsAgent)
  }
  // End of list of possible types for union field detail_info.
}
Fields
name

string

The unique identifier of the agent.

Read-only. Defined by the platform.

displayName

string

Required. The name that the agent displays to users. Maximum 100 characters.

Not modifiable after agent verification.

Union field detail_info. Contains the fields required for the particular product.

Required. detail_info can be only one of the following:

verifiedSmsAgent

object (VerifiedSmsAgent)

Detailed agent information for Verified SMS.

businessMessagesAgent

object (BusinessMessagesAgent)

Detailed agent information for Business Messages.

verifiedCallsAgent

object (VerifiedCallsAgent)

Detailed agent information for Verified Calls.

VerifiedSmsAgent

Agent information specific to Verified SMS.

JSON representation
{
  "description": string,
  "logoUrl": string,
  "senders": [
    {
      object (Sender)
    }
  ]
}
Fields
description

string

Required. Description about the registered agent. The description is visible to end users. Maximum 100 characters.

logoUrl

string

Required. The agent logo. Maximum 50 KB.

senders[]

object (Sender)

The list of Sender IDs for the Verified SMS agent.

Sender

Sender IDs and the countries they operate in.

JSON representation
{
  "senderId": string,
  "countryCode": string
}
Fields
senderId

string

A sender ID—a long code (E.164 format), short code, national code, or alphanumeric code—associated with the agent that can send SMS messages.

countryCode

string

A country the sender ID operates in as an ISO 3166 Alpha-2 country code. For example, "US" for the United States of America.

BusinessMessagesAgent

Agent information specific to Business Messages.

JSON representation
{
  "logoUrl": string,
  "entryPointConfigs": [
    {
      object (BusinessMessagesEntryPointConfig)
    }
  ],
  "conversationalSettings": {
    string: {
      object (ConversationalSetting)
    },
    ...
  },
  "defaultLocale": string,
  "primaryAgentInteraction": {
    object (SupportedAgentInteraction)
  },
  "additionalAgentInteractions": [
    {
      object (SupportedAgentInteraction)
    }
  ],
  "customAgentId": string,
  "agentTestUrl": string,
  "testUrls": [
    {
      object (TestUrl)
    }
  ],
  "phone": {
    object (Phone)
  },
  "authorizationConfig": {
    object (AuthorizationConfig)
  },
  "nonLocalConfig": {
    object (NonLocalConfig)
  },
  "surveyConfig": {
    object (SurveyConfig)
  },
  "dialogflowAssociation": {
    object (DialogflowAssociation)
  }
}
Fields
logoUrl

string

Optional. Publicly available URL of the logo for the agent. Maximum 50 KB.

Not modifiable after agent verification.

entryPointConfigs[]

object (BusinessMessagesEntryPointConfig)

Optional. List of entry point configurations.

Not modifiable after agent verification.

conversationalSettings

map (key: string, value: object (ConversationalSetting))

Required. Conversational settings for an agent, mapped to a locale. Locale is represented by a well-formed IETF BCP 47 language tag.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

defaultLocale

string

Required. The default locale for the agent. Must match a locale defined in conversationalSettings.

primaryAgentInteraction

object (SupportedAgentInteraction)

Required. Primary agent interaction information. Used when the user initiates a conversation.

additionalAgentInteractions[]

object (SupportedAgentInteraction)

Optional. Additional agent interaction information. Enables the agent to support multiple interaction types.

customAgentId

string

Optional. A partner-specified identifier for the agent. The identifier is passed alongside all messages sent to the agent.

agentTestUrl
(deprecated)

string

Output only. The URL for testing the agent's conversational experience.

Defined by the platform.

testUrls[]

object (TestUrl)

Output only. URLs for testing the agent's conversational experience.

Defined by the platform.

phone

object (Phone)

Optional. The phone number for the agent to display. If not specified, the agent displays the phone number for the brand found in the Google Knowledge Graph, if any.

authorizationConfig

object (AuthorizationConfig)

Optional. Authorization configuration for OAuth support.

nonLocalConfig

object (NonLocalConfig)

Optional. Configuration for non-local entry points.

surveyConfig

object (SurveyConfig)

Optional. Configuration to enable custom surveys.

dialogflowAssociation

object (DialogflowAssociation)

Optional. Information about Business Messages/Dialogflow Association.

BusinessMessagesEntryPointConfig

The entry point configuration for an agent.

JSON representation
{
  "allowedEntryPoint": enum (EntryPoint)
}
Fields
allowedEntryPoint

enum (EntryPoint)

Required. The Google surfaces the agent is enabled to appear on.

EntryPoint

The Google surfaces the agent is enabled to appear on.

Enums
ENTRY_POINT_UNSPECIFIED Unspecified entry point.
LOCATION Enable locations for this agent.
NON_LOCAL Enable Business Messages for non-local entry points.

SupportedAgentInteraction

Interactions supported by an agent.

JSON representation
{
  "interactionType": enum (InteractionType),

  // Union field representative can be only one of the following:
  "botRepresentative": {
    object (BotRepresentative)
  },
  "humanRepresentative": {
    object (HumanRepresentative)
  }
  // End of list of possible types for union field representative.
}
Fields
interactionType

enum (InteractionType)

Required. The type of interaction supported by the agent.

Union field representative. The detailed info for the config type. Required. representative can be only one of the following:
botRepresentative

object (BotRepresentative)

Bot representative details.

humanRepresentative

object (HumanRepresentative)

Human representative details.

InteractionType

Type of interaction supported for the agent.

Enums
INTERACTION_TYPE_UNSPECIFIED Unspecified interaction.
BOT Bot interaction.
HUMAN Human interaction.

BotRepresentative

Details for bot representative.

JSON representation
{
  "botMessagingAvailability": {
    object (MessagingAvailability)
  }
}
Fields
botMessagingAvailability

object (MessagingAvailability)

Required. Bot messaging availability.

MessagingAvailability

The hours of each day of the week that messaging is available. You can group hours for multiple days together. For example, * 08:00–16:00 hrs PDT Monday–Wednesday * 10:00–14:00 hrs PDT Thursday–Friday * 15:00–18:00 hrs PDT Thursday–Friday * 10:00–14:00 hrs PDT Saturday–Saturday

If there are gaps in availability, such as no specified availability on Sunday, messaging is unavailable during those gaps.

JSON representation
{
  "hours": [
    {
      object (Hours)
    }
  ]
}
Fields
hours[]

object (Hours)

Required. Hours of messaging availability.

Hours

A range of hours that messaging is available.

JSON representation
{
  "startTime": {
    object (TimeOfDay)
  },
  "endTime": {
    object (TimeOfDay)
  },
  "timeZone": string,
  "startDay": enum (DayOfWeek),
  "endDay": enum (DayOfWeek)
}
Fields
startTime

object (TimeOfDay)

Required. Start time for each day within the day-of-week range.

endTime

object (TimeOfDay)

Required. End time for each day within the day-of-week range.

timeZone

string

Required. The IANA time zone for the hours. For example, "America/Los_Angeles".

startDay

enum (DayOfWeek)

Required. Start day.

endDay

enum (DayOfWeek)

Required. End day. Includes the specified day.

TimeOfDay

Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and google.protobuf.Timestamp.

JSON representation
{
  "hours": integer,
  "minutes": integer,
  "seconds": integer,
  "nanos": integer
}
Fields
hours

integer

Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value "24:00:00" for scenarios like business closing time.

minutes

integer

Minutes of hour of day. Must be from 0 to 59.

seconds

integer

Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.

nanos

integer

Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.

DayOfWeek

Represents a day of the week.

Enums
DAY_OF_WEEK_UNSPECIFIED The day of the week is unspecified.
MONDAY Monday
TUESDAY Tuesday
WEDNESDAY Wednesday
THURSDAY Thursday
FRIDAY Friday
SATURDAY Saturday
SUNDAY Sunday

HumanRepresentative

Details for human representative.

JSON representation
{
  "humanMessagingAvailability": {
    object (MessagingAvailability)
  }
}
Fields
humanMessagingAvailability

object (MessagingAvailability)

Required. Human messaging availability.

Phone

Phone number.

JSON representation
{
  "number": string
}
Fields
number

string

Required. Phone number in E.164 format. For example, "+12223334444".

AuthorizationConfig

Configuration details for supporting OAuth on Business Messages.

JSON representation
{
  "endpointUrl": string
}
Fields
endpointUrl

string

The endpoint URL where the user logs in.

NonLocalConfig

Configuration to enable non-local entry points.

JSON representation
{
  "contactOption": {
    object (ContactOption)
  },
  "enabledDomains": [
    string
  ],
  "phoneNumber": {
    object (Phone)
  },
  "callDeflectionPhoneNumbers": [
    {
      object (Phone)
    }
  ],
  "regionCodes": [
    string
  ]
}
Fields
contactOption

object (ContactOption)

Required. Contact information for the agent that displays with the messaging button.

enabledDomains[]

string

Required. Domains to enable for the sitelinks entry point.

phoneNumber

object (Phone)

Required. Agent's phone number. Overrides the phone field for conversations started from non-local entry points. This phone number will be used for all configured regions.

callDeflectionPhoneNumbers[]

object (Phone)

Required. List of phone numbers for call deflection.

regionCodes[]

string

Required. List of CLDR region codes for countries where the agent is allowed to launch NON_LOCAL entry points. Required for NON_LOCAL entry points.

ContactOption

Contact details displayed in addition to the messaging button.

JSON representation
{
  "url": string,
  "options": [
    enum (Option)
  ]
}
Fields
url

string

Required. The URL that contact options are available for.

options[]

enum (Option)

Required. The list of contact options available for the specified URL.

Option

Contact options.

Enums
OPTION_UNSPECIFIED Unspecified
WEB_CHAT Web Chat option.
PHONE Phone option.
EMAIL Email option.
FAQS FAQ option.
TWITTER Twitter option.
WHATSAPP Whatsapp option.

SurveyConfig

Configuration details for supporting customized survey questions.

JSON representation
{
  "templateQuestionIds": [
    string
  ],
  "customSurveys": {
    string: {
      object (CustomSurveyConfig)
    },
    ...
  }
}
Fields
templateQuestionIds[]

string

List of template question IDs for template questions included in a survey.

customSurveys

map (key: string, value: object (CustomSurveyConfig))

Custom survey questions for an agent, mapped to a locale. Locale is represented by a well-formed IETF BCP 47 language tag.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

CustomSurveyConfig

Custom survey configuration for an agent.

JSON representation
{
  "customQuestions": [
    {
      object (SurveyQuestion)
    }
  ]
}
Fields
customQuestions[]

object (SurveyQuestion)

List of custom questions.

SurveyQuestion

The detailed content of each survey question.

JSON representation
{
  "name": string,
  "questionType": enum (Type),
  "questionContent": string,
  "responseOptions": [
    {
      object (SurveyResponse)
    }
  ]
}
Fields
name

string

Required. The unique identifier of the question.

questionType

enum (Type)

Output only. Type of the question.

questionContent

string

Required. Question content. Limited to 200 characters for custom questions.

responseOptions[]

object (SurveyResponse)

Required. List of responses displayed with the question. Maximum 12.

Type

The type of survey question.

Enums
TYPE_UNSPECIFIED Unknown survey question type.
GOOGLE_STANDARD_QUESTION Google standard survey question.
GOOGLE_TEMPLATE_QUESTION Google provided template survey question.
PARTNER_CUSTOM_QUESTION Partner customized survey question.

SurveyResponse

The content for a survey question response.

JSON representation
{
  "content": string,
  "postbackData": string
}
Fields
content

string

Required. Text that is shown in the survey and sent back to the agent when the user taps it. Maximum 35 characters.

postbackData

string

The string the agent receives when the user taps the question response.

DialogflowAssociation

Information about an associated Dialogflow project and knowledge base.

JSON representation
{
  "name": string,
  "dfProjectId": string,
  "dfServiceAccountEmail": string,
  "knowledgeBases": [
    {
      object (Knowledgebase)
    }
  ],
  "operationInfo": {
    object (OperationInfo)
  },
  "enableAutoResponse": boolean
}
Fields
name

string

Output only. The identifier for the Dialogflow association.

dfProjectId

string

Required. The Dialogflow project ID.

Non-editable. To change this value, you must disassociate the Dialogflow project from this agent, then create a new association.

dfServiceAccountEmail

string

Output only. The service account that must be configured in the Dialogflow project with the "Dialogflow Console Agent Editor" role. This is required to provide access to the Dialogflow API.

knowledgeBases[]

object (Knowledgebase)

Output only. Knowledge bases associated with the Dialogflow project.

operationInfo

object (OperationInfo)

Output only. The Dialogflow association operation information.

enableAutoResponse

boolean

If true, Business Messages automatically sends the Dialogflow responses to users.

VerifiedCallsAgent

Agent information specifically related to Verified Calls.

JSON representation
{
  "logoUrl": string,
  "callReasons": [
    {
      object (CallReason)
    }
  ],
  "phones": [
    {
      object (VerifiedCallsPhone)
    }
  ]
}
Fields
logoUrl

string

Required. Publicly available URL of the agent logo to display with a verified call. Maximum 50 KB.

Not modifiable after agent verification.

callReasons[]

object (CallReason)

Required. Call reasons that this agent may use when placing a verified call.

Only add / remove actions are allowed. Each action will be reviewed before the change takes place.

phones[]

object (VerifiedCallsPhone)

Required. Phone numbers that this agent may use when placing a verified call.

Only add / remove actions are allowed. Each action will be reviewed before the change takes place.

CallReason

Call reason with approval information.

JSON representation
{
  "text": string,
  "approvalDetails": {
    object (ApprovalDetails)
  }
}
Fields
text

string

Immutable. The actual text of the call reason.

approvalDetails

object (ApprovalDetails)

Output only. Approval details; each call reason must be approved before use.

ApprovalDetails

Approval details composed from the state and optional additional information.

JSON representation
{
  "approvalState": enum (State),
  "approvalInfo": string
}
Fields
approvalState

enum (State)

Output only. The current approval state.

approvalInfo

string

Output only. Additional information about the decision, if available.

State

Approval state for a decision.

Enums
STATE_UNSPECIFIED Approval state unspecified.
PENDING_APPROVAL Pending for an approval.
APPROVED Approved.
DENIED Denied.
PENDING_REMOVAL Pending for a deletion.

VerifiedCallsPhone

Phone number with approval information.

JSON representation
{
  "number": string,
  "approvalDetails": {
    object (ApprovalDetails)
  }
}
Fields
number

string

Immutable. Phone number in E.164 format i.e. +18888888888

approvalDetails

object (ApprovalDetails)

Output only. Approval details, each phone number must be approved before use.

Methods

associateDialogflow

Associate a Dialogflow project with an agent.

create

Creates a new agent to represent a brand.

delete

Deletes an agent.

dissociateDialogflow

Dissociate a Dialogflow project from an agent.

get

Get information about an agent.

getLaunch

Gets the launch information for an agent.

getVerification

Gets the verification information for an agent.

list

Lists all the agents associated with a brand.

patch

Updates information about an agent.

requestLaunch

Begins the launch process for an agent.

requestVerification

Begins business information verification for an agent.

updateDialogflowAssociation

Update Dialogflow association settings for an agent.

updateLaunch

Updates the launch information for an agent.

updateVerification

Updates the verification state for an agent.