
Can I get an invoice with our VAT number?
I can’t edit invoices. Want me to get someone?
JAJared joined the chat
Jared · SupportOn it. Sending the new invoice now.
AI assistant with a human handoff
Your assistant answers first. When it gets stuck, or the customer just wants a person, a teammate joins the same chat with the whole story.
Add a human handoff to the AI assistant in my product, with Fernand (https://getfernand.com) as the support backend.
Read these before you write code:
- https://help.getfernand.com/features/headless-contact-form
- https://help.getfernand.com/features/authenticating-users
Find the assistant in my codebase. When it can't resolve a request, or the user asks for a person, show a "Talk to a human" action in the chat. When the user clicks it, POST https://api.getfernand.com/messenger/contact from the browser.
- Header: X-AppId set to my Fernand organization slug. You can send slug instead of the header.
- JSON body: name, email, subject, message (the assistant transcript), and tags: ["in-app-ai-assistant"]. Create that tag in Fernand first.
- Attachments, if I need them, are base64 in that same JSON body.
- A 204 opens an incoming conversation on the default channel.
- If the user is logged in, my backend signs the lowercased email with the chat secret (Settings → Channels → Chat → Authentication) using HMAC-SHA256. The form sends that signature as hash. The secret stays on the server.
- extra is an object, not an array. Example:
"extra": {
"account_id": { "label": "Account ID", "value": "12345" }
}
Replies come back through two webhook rules on the same URL, both filtered to the tag in-app-ai-assistant:
- On "new conversation", the payload includes conversation_id, the message text, the contact email, and the status. Store conversation_id on the thread.
- On "when a reply is sent", webhook the same URL.
- GET /conversations/{id}/messages only when you need attachment URLs.
- History: GET /conversations?search=from:<email> tag:in-app-ai-assistant
Then tell the user in the chat that a teammate has the full conversation, and show my team's replies in the same chat.
Read these first:
- https://developers.getfernand.com/llms.txt (API index, follow the links you need)
- https://help.getfernand.com/features/headless-contact-form
- https://help.getfernand.com/features/support-widget/authenticating-users
Rules:
- Build it with my existing components and design tokens. It should look like the rest of my product, not like a widget.
- Any Fernand API key or secret stays on my server. Never ship it to the browser, never commit it.
- Ask me for anything you can't infer from the codebase, like my Fernand organization slug.CopiedOpen prompt in…
CursorCodexClaude Code

