Package google.mybusiness.businesscalls.v1

Index

BusinessCallsService

This API allows businesses to manage Business Calls and collect insights like the number of missed calls to their location. Additional information about Business calls can be found at https://support.google.com/business/answer/9688285?p=call_history

If the Google Business Profile links to a Google Ads account and call history is turned on, calls that last longer than a specific time, and that can be attributed to an ad interaction, will show in the linked Google Ads account under the "Calls from Ads" conversion. If smart bidding and call conversions are used in the optimization strategy, there could be a change in ad spend. Learn more about smart bidding."

To view and perform actions on a location's calls, you need to be a OWNER, CO_OWNER or MANAGER of the location.

GetBusinessCallsSettings

rpc GetBusinessCallsSettings(GetBusinessCallsSettingsRequest) returns (BusinessCallsSettings)

Returns the Business calls settings resource for the given location.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

ListBusinessCallsInsights

rpc ListBusinessCallsInsights(ListBusinessCallsInsightsRequest) returns (ListBusinessCallsInsightsResponse)

Returns insights for Business calls for a location.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

UpdateBusinessCallsSettings

rpc UpdateBusinessCallsSettings(UpdateBusinessCallsSettingsRequest) returns (BusinessCallsSettings)

Updates the Business call settings for the specified location.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

AggregateMetrics

Metrics aggregated over the input time range.

Fields
missed_calls_count

Int32Value

Total count of missed calls.

answered_calls_count

Int32Value

Total count of answered calls.

hourly_metrics[]

HourlyMetrics

A list of metrics by hour of day.

weekday_metrics[]

WeekDayMetrics

A list of metrics by day of week.

start_date

Date

Date for this metric. If metric is monthly, only year and month are used.

end_date

Date

End date for this metric.

BusinessCallsInsights

Insights for calls made to a location.

Fields
name

string

Required. The resource name of the calls insights. Format: locations/{location}/businesscallsinsights

metric_type

MetricType

The metric for which the value applies.

aggregate_metrics

AggregateMetrics

Metric for the time range based on start_date and end_date.

BusinessCallsSettings

Business calls settings for a location.

Fields
name

string

Required. The resource name of the calls settings. Format: locations/{location}/businesscallssettings

calls_state

CallsState

Required. The state of this location's enrollment in Business calls.

consent_time

Timestamp

Input only. Time when the end user provided consent to the API user to enable business calls.

CallsState

The possible states of a location in business calls. The states can be updated to only ENABLED or DISABLED. Anything else will return PRECONDITION_FAILED error.

Enums
CALLS_STATE_UNSPECIFIED Unspecified.
ENABLED Business calls is enabled for the location.
DISABLED Business calls is disabled for the location.

ErrorCode

Error codes for internal failures.

Enums
ERROR_CODE_UNSPECIFIED Unspecified error code.
ERROR_CODE_UNVERIFIED_LOCATION The location is not verified.
ERROR_CODE_CALLS_NOT_ENABLED The Business calls state for the location is not ENABLED.
ERROR_CODE_NOT_ELIGIBLE_LOCATION The location is not eligible for business calls.

GetBusinessCallsSettingsRequest

Request message for GetBusinessCallsSettings.

Fields
name

string

Required. The BusinessCallsSettings to get.

The name field is used to identify the business call settings to get. Format: locations/{location_id}/businesscallssettings.

HourlyMetrics

Metrics for an hour.

Fields
hour

Int32Value

Hour of the day. Allowed values are 0-23.

missed_calls_count

Int32Value

Total count of missed calls for this hour.

ListBusinessCallsInsightsRequest

Request message for ListBusinessCallsInsights.

Fields
parent

string

Required. The parent location to fetch calls insights for. Format: locations/{location_id}

page_size

int32

Optional. The maximum number of BusinessCallsInsights to return. If unspecified, at most 20 will be returned. Some of the metric_types(e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the page_size is ignored.

page_token

string

Optional. A page token, received from a previous ListBusinessCallsInsights call. Provide this to retrieve the subsequent page.

When paginating, all other parameters provided to ListBusinessCallsInsights must match the call that provided the page token. Some of the metric_types (e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the pake_token is ignored.

filter

string

Optional. A filter constraining the calls insights to return. The response includes only entries that match the filter.

If the MetricType is not provided, AGGREGATE_COUNT is returned. If no end_date is provided, the last date for which data is available is used. If no start_date is provided, we will default to the first date for which data is available, which is currently 6 months. If start_date is before the date when data is available, data is returned starting from the date when it is available.

At this time we support following filters. 1. start_date="DATE" where date is in YYYY-MM-DD format. 2. end_date="DATE" where date is in YYYY-MM-DD format. 3. metric_type=XYZ where XYZ is a valid MetricType. 4. Conjunctions(AND) of all of the above. e.g., "start_date=2021-08-01 AND end_date=2021-08-10 AND metric_type=AGGREGATE_COUNT" The AGGREGATE_COUNT metric_type ignores the DD part of the date.

ListBusinessCallsInsightsResponse

Response message for ListBusinessCallsInsights.

Fields
business_calls_insights[]

BusinessCallsInsights

A collection of business calls insights for the location.

next_page_token

string

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages. Some of the metric_types (e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the next_page_token will be empty.

MetricType

The type of metric.

Enums
METRIC_TYPE_UNSPECIFIED Type of metric is unspecified.
AGGREGATE_COUNT The metrics provided are counts aggregated over the input time_range.

UpdateBusinessCallsSettingsRequest

Request message for UpdateBusinessCallsSettings.

Fields
business_calls_settings

BusinessCallsSettings

Required. The BusinessCallsSettings to update.

The name field is used to identify the business call settings to update. Format: locations/{location_id}/businesscallssettings

update_mask

FieldMask

Required. The list of fields to update.

WeekDayMetrics

Metrics for a week day.

Fields
day

DayOfWeek

Day of the week. Allowed values are Sunday - Saturday.

missed_calls_count

Int32Value

Total count of missed calls for this hour.