APIs & Integrations

maxwellalvesgep
Member

How to add email from Ticket within Contact

SOLVE

PT:
Bom dia, fiz a integração de uma aplicação privada com o hubspot, onde a minha aplicação privada deve ser capaz de criar tickets dentro do hubspot, uma parte da integração já está "ok", porém, preciso vincular o "email" do usuário que criou o ticket a parte de contatos do hubspot. Pelo que entendi da DOC, eu deveria passar um novo parametro chamado "associations", mas eu não sei de onde vem os valores que essa propriedade precisa (vê imagem 1).

Para entendimento geral, olhar imagem 2.

EN:
Good morning, I integrated a private application with HubSpot, where my private application should be able to create tickets within HubSpot. Part of the integration is already "ok", however, I need to link the "email" of the user who created the ticket to the HubSpot contacts section. From what I understood from the DOC, I should pass a new parameter called "associations", but I don't know where the values ​​that this property needs come from (see image 1).

For a general understanding, see image 2.
image 1image 1image 2image 2

0 Upvotes
2 Accepted solutions
maxwellalvesgep
Solution
Member

How to add email from Ticket within Contact

SOLVE

@BérangèreL I solved my problem to using this steps:

1 - Get the form data (Email, title and description)

2 - Make a GET to the "Contacts" endpoint, passing the "email" to check if there is already a registration.

2.1 - If YES: Get the ID in the response returned.

2.2 - If NO: Make a POST to the "Contact" endpoint, get the ID from the response

3 - Make the POST to the Ticket endpoint with the associated ID.

View solution in original post

Brenner
Solution
Recognized Expert

How to add email from Ticket within Contact

SOLVE

Exatamente isso, @maxwellalvesgep !

 

Precisa fazer um check na base se existe o contato, e caso sim, puxar o ID dele para associar ao objeto desejado. 

 

Existe também, uma opção de quando associar o objetos entre si, adicionar uma "Association label". Isso a nível de negócio é muito interessante para ajudar a fazer segmentações mais localizadas de acordo com a label desejada: 

 

Exemplo: Segmentar todos os contatos que estão associados a um negócio no pipeline de vendas com a label "Contato financeiro". 

 

 

Thank you @PamCotton and @BérangèreL for the tag here!



Brenner Natal



HubSpot Consultant | Inbound Marketer



--------------------------------------------------


Se a minha resposta te ajudou, por gentileza, clique no botão: " Aceitar como solução ".
Ainda com dúvidas? Responda a minha postagem para que possamos continuar te ajudando!
Obrigado por postar na comunidade da HubSpot! .



View solution in original post

6 Replies 6
maxwellalvesgep
Member

How to add email from Ticket within Contact

SOLVE

Então antes de fazer o POST do Ticket, eu devo fazer um GET para o endpoint de contato que retornar aquele contato em especifico, pegar o ID e vincular no form? E se o usuário não tiver cadastro, caso seja a primeira vez? Vou ter que fazer um requisição de cadastro antes?

Brenner
Solution
Recognized Expert

How to add email from Ticket within Contact

SOLVE

Exatamente isso, @maxwellalvesgep !

 

Precisa fazer um check na base se existe o contato, e caso sim, puxar o ID dele para associar ao objeto desejado. 

 

Existe também, uma opção de quando associar o objetos entre si, adicionar uma "Association label". Isso a nível de negócio é muito interessante para ajudar a fazer segmentações mais localizadas de acordo com a label desejada: 

 

Exemplo: Segmentar todos os contatos que estão associados a um negócio no pipeline de vendas com a label "Contato financeiro". 

 

 

Thank you @PamCotton and @BérangèreL for the tag here!



Brenner Natal



HubSpot Consultant | Inbound Marketer



--------------------------------------------------


Se a minha resposta te ajudou, por gentileza, clique no botão: " Aceitar como solução ".
Ainda com dúvidas? Responda a minha postagem para que possamos continuar te ajudando!
Obrigado por postar na comunidade da HubSpot! .



BérangèreL
Community Manager
Community Manager

How to add email from Ticket within Contact

SOLVE

Hi @maxwellalvesgep, I hope that you are well!
 

Thanks for reaching out to the HubSpot Community!

For information, I'd like to share these documentation:

- Tickets API
- Tickets

These threads might point you in the right direction:

- The solution from @TomM2 on this post "create ticket on behalf of the customer"
- The solution from @Mike_Eastwood on this post "Add an email to a ticket by API"

Also, I'd love to put you in touch with some of our Top Experts: Hi @Brenner, @sylvain_tirreau and @Bhupendra_Kumar do you have suggestions to help @maxwellalvesgep, please?

Have a lovely day and thanks so much for your help!

Warmly,
Bérangère


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Saviez vous que la Communauté est disponible en français?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres! !
maxwellalvesgep
Solution
Member

How to add email from Ticket within Contact

SOLVE

@BérangèreL I solved my problem to using this steps:

1 - Get the form data (Email, title and description)

2 - Make a GET to the "Contacts" endpoint, passing the "email" to check if there is already a registration.

2.1 - If YES: Get the ID in the response returned.

2.2 - If NO: Make a POST to the "Contact" endpoint, get the ID from the response

3 - Make the POST to the Ticket endpoint with the associated ID.

BérangèreL
Community Manager
Community Manager

How to add email from Ticket within Contact

SOLVE

Hi @maxwellalvesgep, I am so glad to hear that all is working for you now! 🎉

And thanks so much for sharing the solution with the HubSpot Community!

Many Community Members will benefit from this too! ❤️

Have a fantastic day! 🌞

Warmly,
Bérangère


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Saviez vous que la Communauté est disponible en français?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres! !
0 Upvotes
PamCotton
HubSpot Employee
HubSpot Employee

How to add email from Ticket within Contact

SOLVE

Olá @maxwellalvesgep, boa sexta!

 

Para vincular o email do usuário que criou o ticket ao contato no HubSpot, você está correto ao usar o parâmetro "associations". Esse parâmetro deve conter o ID do contato no HubSpot, que você pode obter ao criar ou atualizar o contato via API. 

 

Quando o ticket for criado, você pode passar esse ID no campo "associations" para associá-lo ao contato.

 

Aos nossos colaboradores @Brenner e @DanielSanchez alguma recomendação para @maxwellalvesgep?

 

Obrigada,

Pam