Customer Agent Behavior

Hi Everyone,

The Customer Agent’s capabilities are amazing, but at the same time extremely frustrating, so I wanted to share where I am struggling. Please keep in mind that my intent is apply the bot to handle our form submissions soon.

The Customer Agent is currently deployed on our website, and the intent is for it to capture and create tickets based on certain questions. The questions are the gold nugget for us, we want a ticket for each question asked. Now I have this function working through the Customer Agent’s actions, but the issue is that the original conversation, where the chatbot and user communicated, is not associated to the newly created ticket or deal and from my understanding it is because the object was created through the Customer Agent action. I tried the custom code workflow and using an API, but it does not seem like the functionality of associating a conversation to a ticket (created from Customer Agent action) is not developed as of now.

I understand that the answer likely has something to do with how my chat flows and handoffs are configured, but my worry is that a) I don’t want a new ticket created for every new inbox conversation b) how would it work with multiple questions in the same conversation?

Again, I do think it will eventually lead me back chat flows and what channels are connected where, but honestly the hierarchy and how things funnel where depending on what inputs is extremely confusing to me.

I would appreciate any tips or comments!

Hey @OCoppinger,

Thanks for bringing this to the community!! :glowing_star:

I was able to find a few community threads that might be able to spark some ideas or get you pointed in the right direction:

Tagging in a few folks who may have run into something similar or have thoughts on the chatflow/handoff side of things:

Hey @evaldas, @Crystal_Hopper, @Alex_Boissonneault – do you have any suggestions for @OCoppinger on this?

Thank you!!

Sam, Community Manager

Hi @stassey ,

I appreciate your comment. I have tried to dig into the API call because I know the scope to read and write them exists. I think I just ran into some undeveloped area where specifically tickets created from a customer agent action do not work through the API call, or there is no way to associate a conversation to a ticket through the API call.

Hi @OCoppinger, i ran into exactly this a while back and had the same conclusion as you, “must be undeveloped”. It isn’t. The call works on agent-created tickets too, it just fails silently unless you set both sides of the link.

Ticket to conversation uses two association types (32 and 278). Set one and nothing shows on the ticket. Use the default route and it does both:

PUT /crm/v4/objects/ticket/{ticketId}/associations/default/conversation/{threadId}

Put that in a conversation-based workflow on the agent’s chat channel. The enrolled object is the conversation, so custom code already has the thread ID, you just grab the ticket the agent created for that contact in the last couple of minutes and link it.

On your worries, keep the channel on Inbox, not Help Desk. Help Desk is what gives you a ticket per conversation; on Inbox only your action makes tickets. And multiple questions is fine, several tickets can hang off the same conversation.

Only thing to know before forms.. no conversation exists there, so there’s nothing to associate. Ticket + contact is it.

Try the default route and and hope that would work, pretty sure that’s your missing piece.

@Alex_Boissonneault I appreciate the detailedness of your answer. What do you mean by it fails silently unless you set both sides of the link. Is there any chance you have some free time to walk me through the solution?

Sure. By “silently” I mean the API returns 200 like it worked, but nothing shows up on the ticket. That’s because HubSpot stores the ticket, conversation link as two separate records, one from ticket to conversation (type 32) and one from conversation to ticket (type 278). If you only create one direction, the UI doesn’t pick it up, so you think the call failed when it actually didn’t.

Easy way to check on one of your existing tickets:

GET /crm/v4/objects/ticket/{ticketId}/associations/conversation

If you see only one type ID come back (or nothing), that’s your problem. The /default route I mentioned writes both in one go, so use that instead of the labeled one.

Happy to walk you through it… DM me a couple of times that work for you next week and we’ll do a quick screen share. Bring a ticket ID and the thread ID from the chat, that’s all we need.