Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
O Perfil da Empresa é uma ferramenta sem custo financeiro e fácil de usar para empresas e organizações gerenciarem a presença on-line no Google, incluindo a Pesquisa e o Maps.
A
API Google Business Profile
oferece uma interface para gerenciar informações do local da empresa no Google. Uma
empresa pode conceder acesso por consentimento OAuth a outra empresa para gerenciar
o perfil em nome dela.
As empresas gerenciadas no Perfil da Empresa já foram verificadas pelo
processo de verificação do Perfil da Empresa. Você pode estender o fluxo de consentimento OAuth do Perfil da Empresa para integrar essas empresas ao Business Messages e fazer a verificação automática delas para lançamento no Business Messages.
Esse é um método mais escalonável e rápido para iniciar as Mensagens comerciais e é
o fluxo recomendado para ativar as mensagens em um local do Perfil da Empresa.
Pré-requisitos
Você precisa ser um parceiro do Perfil da Empresa com acesso às APIs do Perfil da Empresa do Google. Caso contrário, siga os pré-requisitos do Perfil da Empresa para solicitar o acesso.
Ativar as Mensagens comerciais em um local verificado do Perfil da Empresa
O diagrama a seguir mostra como seu serviço da Web pode aproveitar a verificação de local do Perfil da Empresa de uma marca para um agente de Mensagens comerciais. Confira abaixo
instruções detalhadas.
No fluxo de consentimento do OAuth, em que um proprietário de conta do Perfil da Empresa concede acesso para você chamar as APIs do Perfil da Empresa no nome dele, atualize os escopos da API para incluir
Ambos os escopos são necessários para verificar automaticamente o agente e os locais
da empresa.
Crie um agente
com um displayName que corresponda ao nome de pelo menos uma das listagens do Perfil da Empresa no Google
pertencentes às credenciais OAuth que você recebeu na
etapa anterior. Pesquise locais com a API do Perfil da Empresa do Google para encontrar os nomes das empresas.
Para correspondência de nome,
Não há distinção entre maiúsculas e minúsculas.
O nome completo do agente precisa ser idêntico à primeira palavra ou ao nome do local do Perfil da Empresa. Por exemplo, um agente chamado "GBP Bakery"
corresponde a "Gbp Bakery Mountain View", "Gbp Bakery" e "gbp bakery sunnyvale",
mas não corresponde a "Bakery San Francisco".
Para cada local no Perfil da Empresa,
crie um local
com o mesmo placeId. O placeId de um local do Perfil da Empresa está
contido no objeto
LocationKey
quando um local é recuperado da API Google Business Profile.
A solicitação de verificação exige informações de contato da marca. No entanto, o
processo de verificação não vai enviar um e-mail para a marca se o nome do agente
for igual ao do Perfil da Empresa e se você tiver recebido o token OAuth
com os escopos corretos.
Se você fez isso corretamente, a saída da solicitação de verificação vai retornar imediatamente um verificationState de VERIFICATION_STATE_VERIFIED.
Se verificationState retornar um valor diferente, é provável que você não tenha usado o token OAuth correto ao fazer a solicitação ou que o agente não tenha sido associado a um local do Perfil da Empresa.
Usando o mesmo token do OAuth, solicite a verificação do local para todos os locais que pertencem à empresa no Perfil da Empresa.
Assim como na verificação de agentes, se você fez isso corretamente, a saída da
solicitação de verificação vai retornar imediatamente um verificationState de
VERIFICATION_STATE_VERIFIED. Se verificationState retornar um valor diferente, é provável que você não tenha usado o token OAuth correto ao fazer a solicitação ou que o local do Perfil da Empresa não seja uma empresa reivindicada e verificada.
Ative as mensagens para locais específicos
abrindo
os locais que você quer disponibilizar na Pesquisa e no Maps. Quando
o processo de lançamento começa, as mensagens de cada local lançado ficam disponíveis
para os usuários em algumas horas.
Depois de seguir essas etapas, todas as mensagens do consumidor são postadas no webhook
registrado para mensagens comerciais, e você precisa enviar respostas aos consumidores com a
API Business Messages.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2024-12-17 UTC."],[[["\u003cp\u003eBusiness Profile is a free tool that allows businesses to manage their online presence on Google Search and Maps.\u003c/p\u003e\n"],["\u003cp\u003eBusinesses can grant access to other businesses to manage their profiles through the Business Profile API.\u003c/p\u003e\n"],["\u003cp\u003eVerified Business Profile locations can be easily onboarded to Business Messages, enabling faster messaging setup.\u003c/p\u003e\n"],["\u003cp\u003eThis streamlined process involves updating API scopes, creating an agent, and verifying the agent and locations, ultimately leading to a quicker Business Messages launch.\u003c/p\u003e\n"],["\u003cp\u003eOnce launched, businesses can receive and respond to customer messages through the Business Messages API.\u003c/p\u003e\n"]]],[],null,["# Onboard locations from Business Profile\n\n[Business Profile](https://www.google.com/business/) is a free\nand easy-to-use tool for businesses and organizations to manage their online\npresence across Google, including Search and Maps.\n\nThe\n[Google Business Profile API](/my-business)\nprovides an interface for managing business location information on Google. A\nbusiness can grant access through OAuth consent to another business to manage\ntheir profile on their behalf.\n\nManaged businesses on Business Profile have already been verified through the\nBusiness Profile verification process. You can extend the Business Profile OAuth\nconsent flow to onboard these businesses to Business Messages and auto-verify\nthem for launch on Business Messages.\n\nThis is a more scalable and faster method to launch Business Messages and is\nthe recommended flow for enabling messaging for a Business Profile location.\n\nPrerequisites\n-------------\n\nYou must be an existing Business Profile partner with access to the Google\nBusiness Profile APIs. If you aren't, follow the Business Profile\n[prerequisites](/my-business/content/prereqs)\nto apply for access.\n\nOnce you are granted access to the Google Business Profile API, follow their\n[basic setup](/my-business/content/basic-setup)\nand [OAuth setup](/my-business/content/oauth-setup)\nguides before continuing.\n\nEnable Business Messages for a verified Business Profile location\n-----------------------------------------------------------------\n\nThe following diagram shows how your web service can leverage a brand's\nBusiness Profile location verification for a Business Messages agent. See below\nfor detailed instructions.\n\n1. In your existing OAuth consent flow where a Business Profile account owner\n grants you access to call the Google Business Profile APIs on their behalf,\n update the API scopes to include\n\n - https://www.googleapis.com/auth/business.manage\n - https://www.googleapis.com/auth/businesscommunications\n\n Both scopes are required to successfully auto-verify the agent and business\n locations.\n2. [Create an agent](/business-communications/business-messages/guides/how-to/agents)\n with a `displayName` that matches the name of least one of the Google\n Business Profile listings owned by the OAuth credentials you obtained in the\n previous step. Look up\n [locations](/my-business/reference/businessinformation/rest/v1/accounts.locations/list)\n with the [Google Business Profile\n API](/my-business/content/overview)\n to find the names of businesses.\n\n For name matching,\n - Character casing is insensitive.\n - The agent's full name must exactly match the first word or words in the Business Profile location name. For example, an agent named \"GBP Bakery\" matches \"Gbp Bakery Mountain View\", \"Gbp Bakery\", and \"gbp bakery sunnyvale\", but it doesn't match \"Bakery San Francisco\".\n3. For each location in Business Profile,\n [create a location](/business-communications/business-messages/guides/how-to/locations#create-location)\n with the same `placeId`. The `placeId` for a Business Profile location is\n contained within the\n [`LocationKey`](/my-business/reference/businessinformation/rest/v1/accounts.locations#resource:-location)\n object when a location is retrieved from the Google Business Profile API.\n\n4. With the agent you created and the obtained OAuth token, [request agent\n verification](/business-communications/business-messages/guides/how-to/verify#verify_an_agent).\n\n | **Note:** You must use the obtained dual-scope OAuth token, not your project's service account key.\n\n The verification request requires brand contact information. However, the\n verification process won't send an email to the brand if the agent name\n matches the Business Profile name and if you obtained the OAuth token\n with the correct scopes.\n\n If you did this correctly, the output from the verification request should\n immediately return a `verificationState` of `VERIFICATION_STATE_VERIFIED`.\n If `verificationState` returns a different value, then it's likely that you\n didn't use the correct OAuth token when making the request or the agent\n couldn't be matched to a Business Profile location.\n5. Using the same OAuth token, [request location\n verification](/business-communications/business-messages/guides/how-to/verify#location_verification)\n for all locations owned by the business on Business Profile.\n\n As with agent verification, if you did this correctly, the output from the\n verification request should immediately return a `verificationState` of\n `VERIFICATION_STATE_VERIFIED`. If `verificationState` returns a different\n value, then it is likely that you didn't use the correct OAuth token when\n making the request or the Business Profile location isn't a claimed and\n verified business.\n6. [Launch the\n agent](/business-communications/business-messages/guides/how-to/launch/agents#launch-agent)\n with the entry point `LOCATION`.\n\n7. Enable messaging for specific locations by\n [launching](/business-communications/business-messages/guides/how-to/launch/locations)\n the locations that you want to be available through Search and Maps. Once\n the launch process begins, messaging for each launched location is available\n to users within a few hours.\n\nOnce you follow these steps, all consumer messages are posted to your registered\nBusiness Messages webhook, and you must send responses to consumers with the\n[Business Messages API](/business-communications/business-messages/reference/rest)."]]