Onboarding: iframe integration
This page will help you get started with Intrepid Fox. You'll be up and running in a jiffy!
To integrate our dynamic forms into your front end, you need to generate a link via our API and open it in an iframe on your webpage.
- Generate a link: post API call API Reference
Nota Bene:- Use "case_kind": "onboarding"
- Account_owners - representatives (one or more) responsible for onboarding and expected to manage the account.
- Get Conversation ID in the response
{
"result": "case_created",
"case_id": "...",
"conversation_id": "..."
}Here, the conversation_id refers to an individual conversation used to access the dialog. The case_id is required only to connect multiple conversations, for example, when using follow-up requests and creating additional conversations within the same case.
- The link to the dynamic forms provided below.
Please get a partner_code from us.
https://intrepidfox.app/partner/[partner_code]?id=[add conversation_id here]- Add html to your webpage
<div id="intrepid-fox-container"></div>- Use script below to upload iframe with chat, inserting the LINK at p.3 into the LINK parameter
const iframe = document.createElement("iframe");
iframe.setAttribute("src", LINK);
iframe.setAttribute("frameborder", "0");
iframe.setAttribute("width", "100%");
iframe.setAttribute("height", "100%");
iframe.setAttribute("style", "min-height: 100vh");
const el = document.getElementById("intrepid-fox-container");
el?.appendChild(iframe);
window.addEventListener("message", (event) => {
if (!["https://intrepidfox.app"].includes(event.origin) || !event.data.name)
return;
console.log(event.data.name);
// wait for events with name chat-loaded/chat-is-finished
});- Wait for the events at console.log(event.data.name):
chat-loaded - iframe loaded confirmation
chat-is-finished - the chat completed
- Once you get chat-is-finished, you close the iframe
Updated 3 months ago
What’s Next
