There are two ways to collect data from users when they engage with your AI Chat.
Through a form
Conversationally
There are pros and cons for each approach. Forms are easier to set up and is programmatic, but collecting information conversationally is more
natural and engaging despite the added complexity. You can send any collected data via webhook to a CRM as soon as your user submits it.
To add a form to your AI Chat, go to Customizations tab on the left navigation menu, then scroll down until you see the “Form” section:
You can select one of the default fields you’d like to include in the form. Alternatively, you can create custom fields.
For custom fields, you can change the field types (text, dropdown, checkbox). You can also make certain fields mandatory. If at least one field is
mandatory, you will also gain the option to make the entire form mandatory before the user can proceed with chatting. Making the form mandatory
will cause the “x” button on the top right of the form to disappear, thereby preventing users from closing the form before completing it.
If you want to maintain a natural conversational flow and collect data from users directly, you will have to configure your AI Agent(s) prompt and
set up variables to store the collected information.
The behavior of your AI Chat is governed by your AI Agent(s)‘s prompt. To review and edit the prompt, go to AI Agents
tab on the left navigation menu, then click on the Agent you’d like to edit.
If you created your AI Chat using a template, then you may be using a default
prompt we generated for you. If this is the first time you are configuring an
AI Agent prompt, we recommend you to read our Prompt Engineering guide for
best practices.
Configure your prompt to include detailed instructions for collecting user data. Make sure you cover when, what, and how. For example, here is a snippet
that can serve as a guide:
### Instructions- When engaging with the user for the first time, politely ask for their first name.- Once the user provides their first name, proceed with the following steps to collect their contact information.- Ask for the user's mobile telephone number after collecting their first name.- After the mobile telephone number is collected, ask for their e-mail address.- If the user is not comfortable providing any particular piece of information, do not force them. Respect their decision.
But this only directs the AI to ask for information from the user. We still need a way to store the collected information. Next, we’ll teach you how to store
the collected data into variables.
Go to Customizations tab on right navigation bar, then scroll down until you see “User Data Collection”. Click to expand it.
Inside, you can create variables to store information that is collected from the user during the conversation. You can set up multiple variables, each corresponding
to a single piece of information. When setting up a variable, please provide the variable name, description, and example values. Try to be as detailed and explicit
as possible.
The more examples you provide, the better it is for the AI to understand the format you’re looking for.Make sure to define enough variables to store all the information you are requesting from the user. In the example prompt snippet above, you would need the user’s name,
phone, and email.Once everything has been set up, you can test the AI Chat in preview mode. If everything works as intended, you should see the data being collected in your inbox every
time a user engages meaningfully with your AI Chat.
Variable values can change if the user specifies that they want to make a
correction or update. The AI is generally good at understanding the correct
value to assign.
Regardless of whether you want to collect data using a form or conversationally, you may wish to send that information to another CRM for follow up. Chatsistant supports
webhooks with smart triggers that can alert you to new leads as soon as they engage with the AI.Go to Customizations tab on the left navigation menu. Then scroll down to “Webhook”. Click to expand it.
If you are using a form, then you can select the “Form Submission” event and specify the API endpoint where you want the collected data to be sent (POST request).If you are using variables to store user data, then you can select the “Data Collection” event and choose the variables you’d like to be sent. Please note that the webhook
will only be triggered if all your designated variables have been collected (must not be empty).If you want a certain variables to be optional, then you can give it a default value during variable setup. This way, it will always be in a populated state and never empty.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Chatsistant API","colors":{"primary":"#2E3F51","light":"#516F90","dark":"#0D001D"},"favicon":"/logo/favicon.png","logo":{"light":"https://mintcdn.com/chatsistant/bw0W4PPFP0FNqFg-/logo/light.svg?fit=max\u0026auto=format\u0026n=bw0W4PPFP0FNqFg-\u0026q=85\u0026s=f721e4cc50453f170fe167c8d5f9971f","dark":"https://mintcdn.com/chatsistant/bw0W4PPFP0FNqFg-/logo/dark.svg?fit=max\u0026auto=format\u0026n=bw0W4PPFP0FNqFg-\u0026q=85\u0026s=fcd6fd05fd8afca74097b05fde4c4007","href":"https://chatsistant.com"},"api":{"mdx":{"server":"https://app.chatsistant.com/api","auth":{"method":"bearer","name":null}}},"background":{"decoration":null,"color":{"light":null,"dark":"#111827"}},"navbar":{"links":[{"label":"Support","href":"mailto:hello@chatsistant.com"}],"primary":null},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"chatsistant","hasAudioNarration":false,"actualSubdomain":"chatsistant","customDomains":["docs.chatsistant.com"],"gitSource":{"type":"github","owner":"chatsistant","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21f6212af1650193592d35","collectionId":"ff68fb2a-91c7-4dc0-a6ff-701a8cd7a98c","schemaVersion":"v2"},"entitlements":{},"buildId":"6a21f6212af1650193592d35:success","clientVersion":"0.0.3964","searchFilterCounts":[{"language":"default","tag":"API References","count":38},{"language":"default","tag":"Documentation","count":17},{"language":"default","tag":"Guides","count":14},{"language":"default","tag":"Data Sources","count":9},{"language":"default","tag":"Chatbots","count":6},{"language":"default","tag":"Agents","count":5},{"language":"default","tag":"Session Messages","count":5},{"language":"default","tag":"Chatbot Sessions","count":5},{"language":"default","tag":"API Usage Guides","count":4},{"language":"default","tag":"Data Source Tags","count":4}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"lead-collection","slug":"/lead-collection","pageMetadata":{"title":"Lead Collection","description":null,"href":"/lead-collection"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,Note,OptimizedImage}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`There are two ways to collect data from users when they engage with your AI Chat.`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Through a form`}),`\n`,_jsx(_components.li,{children:`Conversationally`}),`\n`]}),`\n`,_jsx(_components.p,{children:`There are pros and cons for each approach. Forms are easier to set up and is programmatic, but collecting information conversationally is more\nnatural and engaging despite the added complexity. You can send any collected data via webhook to a CRM as soon as your user submits it.`}),`\n`,_jsx(Heading,{level:`2`,id:`collecting-data-through-a-form`,children:`Collecting data through a form`}),`\n`,_jsx(_components.p,{children:`To add a form to your AI Chat, go to Customizations tab on the left navigation menu, then scroll down until you see the “Form” section:`}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13.png?fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=938aba136fed3ae10d35be64db6dd72b`,\"data-og-width\":`1912`,width:`1912`,\"data-og-height\":`907`,height:`907`,\"data-path\":`images/lead-collection-13.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13.png?w=280\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=96acf6ef5c04289691eac2377f450526 280w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13.png?w=560\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=0f29a14e743b449176259f9f2f04d431 560w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13.png?w=840\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=646dd3042f3305c11a3c69c0d7113bc6 840w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13.png?w=1100\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=7cf7493f288fbbfb312c418ff99e9aaf 1100w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13.png?w=1650\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=12c616475e866beed85a7b7da9d7f1af 1650w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13.png?w=2500\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=ca72e3c962600b9c68eef574aa49f006 2500w`})}),`\n`,_jsx(_components.p,{children:`You can select one of the default fields you’d like to include in the form. Alternatively, you can create custom fields.`}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13-1.png?fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=3df8bf80e4279ab3ed4758c91b33dafc`,\"data-og-width\":`1912`,width:`1912`,\"data-og-height\":`907`,height:`907`,\"data-path\":`images/lead-collection-13-1.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13-1.png?w=280\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=453daaed1a03c2e03e3acbad5492fe7b 280w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13-1.png?w=560\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=40556c88121955807a0a1fcfc0fbc0d4 560w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13-1.png?w=840\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=4769b75f0a63ad6c74d3eed1051d7e41 840w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13-1.png?w=1100\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=9f13c8a156c63cc51ef75d686c8b1680 1100w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13-1.png?w=1650\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=709fcacc1f510854d0974ce8a7e0d45e 1650w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13-1.png?w=2500\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=fed87a4444e39d591e0645cfd5b1daa0 2500w`})}),`\n`,_jsx(_components.p,{children:`For custom fields, you can change the field types (text, dropdown, checkbox). You can also make certain fields mandatory. If at least one field is\nmandatory, you will also gain the option to make the entire form mandatory before the user can proceed with chatting. Making the form mandatory\nwill cause the “x” button on the top right of the form to disappear, thereby preventing users from closing the form before completing it.`}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13-2.png?fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=22a5374c34eecb2a73f69e194d37c915`,\"data-og-width\":`1600`,width:`1600`,\"data-og-height\":`769`,height:`769`,\"data-path\":`images/lead-collection-13-2.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13-2.png?w=280\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=9aa77d34ffae2a407d81b125f4e81e96 280w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13-2.png?w=560\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=7ab0b5f80216639a7390a50db4bcc9c5 560w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13-2.png?w=840\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=4b26d2178f20751b68a02cfb767e3bf6 840w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13-2.png?w=1100\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=3df7a0ef02bcd8f6e9cd61c3375dd926 1100w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13-2.png?w=1650\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=a917a7d1c4133f7d87337fb19239e891 1650w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-13-2.png?w=2500\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=372e5599db1c417b2172026bfa1b1a35 2500w`})}),`\n`,_jsx(Heading,{level:`2`,id:`collecting-data-conversationally`,children:`Collecting data conversationally`}),`\n`,_jsx(_components.p,{children:`If you want to maintain a natural conversational flow and collect data from users directly, you will have to configure your AI Agent(s) prompt and\nset up variables to store the collected information.`}),`\n`,_jsx(Heading,{level:`3`,id:`editing-the-prompt`,children:`Editing the prompt`}),`\n`,_jsx(_components.p,{children:`The behavior of your AI Chat is governed by your AI Agent(s)‘s prompt. To review and edit the prompt, go to AI Agents\ntab on the left navigation menu, then click on the Agent you’d like to edit.`}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`If you created your AI Chat using a template, then you may be using a default\nprompt we generated for you. If this is the first time you are configuring an\nAI Agent prompt, we recommend you to read our Prompt Engineering guide for\nbest practices.`})}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-16.png?fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=ed59485df6de801bfefa2e5915d3562c`,\"data-og-width\":`1917`,width:`1917`,\"data-og-height\":`908`,height:`908`,\"data-path\":`images/lead-collection-16.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-16.png?w=280\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=3f0f5e15511e4a5b7cac8af3a2fa1e8e 280w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-16.png?w=560\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=e89de5e6eecfa08d48d0e04b5ed389a5 560w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-16.png?w=840\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=fc019cb18a5f4c4b8402d5976f1e03cb 840w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-16.png?w=1100\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=99b123c837d705fd3d655276fc21f8b3 1100w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-16.png?w=1650\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=0ab3b18915d19dd37bde4f0f0661dc47 1650w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-16.png?w=2500\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=5b906ba386494242520dad930f900262 2500w`})}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-17.png?fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=fb49c25debc3fac0c32aa8b4af095674`,\"data-og-width\":`1600`,width:`1600`,\"data-og-height\":`769`,height:`769`,\"data-path\":`images/lead-collection-17.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-17.png?w=280\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=b8ae817d6a9caacf3a80e008a73a7612 280w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-17.png?w=560\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=2e3a723e17afd02d58a05cfe941d2259 560w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-17.png?w=840\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=0befb3de55cf6f108b52c400a979a300 840w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-17.png?w=1100\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=6f7bd6589cb1fbdd3bfc61bea23dfe7e 1100w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-17.png?w=1650\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=7e490475ddc23bb6bba8c01b288a13b2 1650w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-17.png?w=2500\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=10e7f95073eb59e24b6e81d6c8189351 2500w`})}),`\n`,_jsx(_components.p,{children:`Configure your prompt to include detailed instructions for collecting user data. Make sure you cover when, what, and how. For example, here is a snippet\nthat can serve as a guide:`}),`\n`,_jsx(CodeBlock,{numberOfLines:`7`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`### Instructions`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- When engaging with the user for the first time, politely ask for their first name.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Once the user provides their first name, proceed with the following steps to collect their contact information.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- Ask for the user's mobile telephone number after collecting their first name.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- After the mobile telephone number is collected, ask for their e-mail address.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`- If the user is not comfortable providing any particular piece of information, do not force them. Respect their decision.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`But this only directs the AI to ask for information from the user. We still need a way to store the collected information. Next, we’ll teach you how to store\nthe collected data into variables.`}),`\n`,_jsx(Heading,{level:`3`,id:`setting-up-variables`,children:`Setting up variables`}),`\n`,_jsx(_components.p,{children:`Go to Customizations tab on right navigation bar, then scroll down until you see “User Data Collection”. Click to expand it.`}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-18.png?fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=01223527370603792c86e9d82408b090`,\"data-og-width\":`1600`,width:`1600`,\"data-og-height\":`769`,height:`769`,\"data-path\":`images/lead-collection-18.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-18.png?w=280\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=67ef0323d3c21c35f3ccafe4e8a1f8a2 280w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-18.png?w=560\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=65fa7e82c6fb3eaff81deed6a93c0c50 560w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-18.png?w=840\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=1da53719c87feccaba16acc70fbaa57c 840w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-18.png?w=1100\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=f08aa84055f2fe11612d068715dd9606 1100w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-18.png?w=1650\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=b95ca376c353a6691d917e9b8cae7664 1650w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-18.png?w=2500\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=10a00177cb2fe9ee65cc9704db6f229d 2500w`})}),`\n`,_jsx(_components.p,{children:`Inside, you can create variables to store information that is collected from the user during the conversation. You can set up multiple variables, each corresponding\nto a single piece of information. When setting up a variable, please provide the variable name, description, and example values. Try to be as detailed and explicit\nas possible.`}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-19.png?fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=78c8734c70fad0b4adac6b525e335ffe`,\"data-og-width\":`1917`,width:`1917`,\"data-og-height\":`907`,height:`907`,\"data-path\":`images/lead-collection-19.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-19.png?w=280\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=eef91d999aaa057a126b54269815aebb 280w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-19.png?w=560\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=4924bdb64e92a3699186549c9807be29 560w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-19.png?w=840\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=161e3224d7a2e621e75e38afa0327b2a 840w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-19.png?w=1100\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=36596b84a17f36935d059c371db496b6 1100w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-19.png?w=1650\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=d155497e5662294af5914967ab65debc 1650w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-19.png?w=2500\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=81bd8a5996064b9a6e4e649707487bf5 2500w`})}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-19-1.png?fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=1592a59ad3285d767fbeed3515062a25`,\"data-og-width\":`727`,width:`727`,\"data-og-height\":`581`,height:`581`,\"data-path\":`images/lead-collection-19-1.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-19-1.png?w=280\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=449727f3c087b16e1a58fba7f191b4a8 280w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-19-1.png?w=560\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=f18236e66405757d007469acbc72e7db 560w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-19-1.png?w=840\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=0b35fbcb0804c56d6e098011104dce4c 840w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-19-1.png?w=1100\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=082d232dcf1f1b86cdc1afd1683295b2 1100w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-19-1.png?w=1650\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=b3c3b2a90c7bdf6d54eebe6990aa4d1d 1650w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-19-1.png?w=2500\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=8a55774c4461206be447872c280e6d9f 2500w`})}),`\n`,_jsx(_components.p,{children:_jsx(_components.em,{children:`The more examples you provide, the better it is for the AI to understand the format you’re looking for.`})}),`\n`,_jsx(_components.p,{children:`Make sure to define enough variables to store all the information you are requesting from the user. In the example prompt snippet above, you would need the user’s name,\nphone, and email.`}),`\n`,_jsx(_components.p,{children:`Once everything has been set up, you can test the AI Chat in preview mode. If everything works as intended, you should see the data being collected in your inbox every\ntime a user engages meaningfully with your AI Chat.`}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Variable values can change if the user specifies that they want to make a\ncorrection or update. The AI is generally good at understanding the correct\nvalue to assign.`})}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-20.png?fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=4f95db879f92127d3799e0ed68b73be9`,\"data-og-width\":`1918`,width:`1918`,\"data-og-height\":`905`,height:`905`,\"data-path\":`images/lead-collection-20.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-20.png?w=280\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=c9507bc497950a51e2dfd8c24732d77c 280w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-20.png?w=560\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=b768006e4c7ec5d68278297824989b28 560w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-20.png?w=840\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=7de9277dcfa78b0a61221fec5ab40ea4 840w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-20.png?w=1100\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=03098e7ec1d35c0fcf6dde5c3cfa00dd 1100w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-20.png?w=1650\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=28cd1893546eb079fd6749990181ad1d 1650w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-20.png?w=2500\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=59a79eddcc52d6d63ea97fa2f6f0b1ca 2500w`})}),`\n`,_jsx(Heading,{level:`2`,id:`sending-data-to-your-crm`,children:`Sending data to your CRM`}),`\n`,_jsx(_components.p,{children:`Regardless of whether you want to collect data using a form or conversationally, you may wish to send that information to another CRM for follow up. Chatsistant supports\nwebhooks with smart triggers that can alert you to new leads as soon as they engage with the AI.`}),`\n`,_jsx(_components.p,{children:`Go to Customizations tab on the left navigation menu. Then scroll down to “Webhook”. Click to expand it.`}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-21.png?fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=ab8b49b836d6ced9aad8ccbe34ca691a`,\"data-og-width\":`1600`,width:`1600`,\"data-og-height\":`769`,height:`769`,\"data-path\":`images/lead-collection-21.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-21.png?w=280\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=f7dc959f95037b1285834a0f5d045576 280w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-21.png?w=560\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=168277402b0a17b98efcebb1d03eafbb 560w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-21.png?w=840\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=8deead5dd7782f7338354bf7cf2f8d4b 840w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-21.png?w=1100\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=be8d3bf1a26606d0dab81194faa6f27c 1100w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-21.png?w=1650\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=ccb59b8c627e26b89d5cf23f418fef23 1650w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-21.png?w=2500\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=dcbd7741125b5cc9d09ff9c9d8ce1b68 2500w`})}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-21-1.png?fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=6ea3bed6b18e3719f6a00b86a0331601`,\"data-og-width\":`1918`,width:`1918`,\"data-og-height\":`908`,height:`908`,\"data-path\":`images/lead-collection-21-1.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-21-1.png?w=280\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=2b6191065eb94df106c1eb33556ecb3a 280w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-21-1.png?w=560\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=aa9e6dfe2383dc734220f5d2a4ca593f 560w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-21-1.png?w=840\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=d4075a2bc0b140fc884072129fe0b63e 840w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-21-1.png?w=1100\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=677a7e4e38bbdd6309f8c252b8e8307f 1100w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-21-1.png?w=1650\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=9754eb0420b4938401f90a201c7e57aa 1650w, https://mintcdn.com/chatsistant/cqQo3vlCWcOFuvWd/images/lead-collection-21-1.png?w=2500\u0026fit=max\u0026auto=format\u0026n=cqQo3vlCWcOFuvWd\u0026q=85\u0026s=5921eecd8803be89bb21628a2c1d4b9c 2500w`})}),`\n`,_jsx(_components.p,{children:`If you are using a form, then you can select the “Form Submission” event and specify the API endpoint where you want the collected data to be sent (POST request).`}),`\n`,_jsxs(_components.p,{children:[`If you are using variables to store user data, then you can select the “Data Collection” event and choose the variables you’d like to be sent. `,_jsx(_components.strong,{children:`Please note that the webhook\nwill only be triggered if all your designated variables have been collected (must not be empty).`})]}),`\n`,_jsx(_components.p,{children:`If you want a certain variables to be optional, then you can give it a default value during variable setup. This way, it will always be in a populated state and never empty.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Lead Collection","description":null,"href":"/lead-collection"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Collecting data through a form","slug":"collecting-data-through-a-form","depth":2,"children":[]},{"title":"Collecting data conversationally","slug":"collecting-data-conversationally","depth":2,"children":[{"title":"Editing the prompt","slug":"editing-the-prompt","depth":3,"children":[]},{"title":"Setting up variables","slug":"setting-up-variables","depth":3,"children":[]}]},{"title":"Sending data to your CRM","slug":"sending-data-to-your-crm","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"chatsistant","siteName":"Chatsistant API","title":"Lead Collection - Chatsistant API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T05:56:56.414Z","originalFileLocation":"lead-collection.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Chatsistant API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/chatsistant/jsSqGek8HR7LeVmL/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/chatsistant/jsSqGek8HR7LeVmL/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/chatsistant/jsSqGek8HR7LeVmL/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/chatsistant/jsSqGek8HR7LeVmL/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/chatsistant/jsSqGek8HR7LeVmL/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/chatsistant/jsSqGek8HR7LeVmL/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/chatsistant/jsSqGek8HR7LeVmL/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/chatsistant/jsSqGek8HR7LeVmL/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/chatsistant/jsSqGek8HR7LeVmL/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Lead Collection - Chatsistant API\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Chatsistant API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.chatsistant.com/lead-collection\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://chatsistant.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=Lead+Collection\u0026amp;theme=d7f2b54eec0e3933ad58bfa6\u0026amp;signature=64e6bcdfd605a6f64d888cf6930f34c32bd790012ab928073b856d60c930bb42\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Lead Collection - Chatsistant API\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://chatsistant.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=Lead+Collection\u0026amp;theme=d7f2b54eec0e3933ad58bfa6\u0026amp;signature=64e6bcdfd605a6f64d888cf6930f34c32bd790012ab928073b856d60c930bb42\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/chatsistant/jsSqGek8HR7LeVmL/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Chatsistant API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2E3F51\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.chatsistant.com/lead-collection\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/lead-collection.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.chatsistant.com/#organization\",\"name\":\"Chatsistant API\",\"url\":\"https://docs.chatsistant.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/chatsistant/bw0W4PPFP0FNqFg-/logo/light.svg?fit=max\u0026auto=format\u0026n=bw0W4PPFP0FNqFg-\u0026q=85\u0026s=f721e4cc50453f170fe167c8d5f9971f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.chatsistant.com#website\",\"name\":\"Chatsistant API\",\"url\":\"https://docs.chatsistant.com\",\"publisher\":{\"@id\":\"https://docs.chatsistant.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.chatsistant.com/lead-collection#webpage\",\"url\":\"https://docs.chatsistant.com/lead-collection\",\"name\":\"Lead Collection\",\"dateModified\":\"2026-01-07T05:56:56.414Z\",\"isPartOf\":{\"@id\":\"https://docs.chatsistant.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.chatsistant.com/lead-collection#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.chatsistant.com/lead-collection#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://docs.chatsistant.com/creating-first-chatbot\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Lead Collection\",\"item\":\"https://docs.chatsistant.com/lead-collection\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.chatsistant.com/lead-collection#article\",\"headline\":\"Lead Collection\",\"name\":\"Lead Collection\",\"url\":\"https://docs.chatsistant.com/lead-collection\",\"mainEntityOfPage\":{\"@id\":\"https://docs.chatsistant.com/lead-collection#webpage\"},\"dateModified\":\"2026-01-07T05:56:56.414Z\",\"publisher\":{\"@id\":\"https://docs.chatsistant.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.chatsistant.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Chatsistant API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Chatsistant API","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/introduction"}]},{"group":"Guides","pages":[{"title":"Create Your First Chatbot","description":null,"href":"/creating-first-chatbot"},{"title":"Lead Collection","href":"/lead-collection"},{"title":"Human Support Escalation","description":null,"href":"/human-support-escalation"},{"title":"Inbox Notifications","href":"/inbox-notifications"},{"title":"Conversation Labeling","href":"/conversation-labeling"},{"title":"Multi-Agents Chatbot","href":"/multi-agents-chatbot"},{"title":"Fine Tuning Agent Intents","href":"/fine-tuning-agent-intents"},{"title":"AI Supervisor Overrides","href":"/supervisor-overrides"},{"title":"Bring Your Own Key (BYOK) and Pricing","href":"/byok-pricing-guide"},{"title":"Working with Tables and CSV","href":"/working-with-tables"},{"title":"Best practices for preparing training data","href":"/best-practices"},{"title":"Background Agents","href":"/background-agents"},{"title":"Frustration Detection","href":"/frustration-detection"},{"title":"Why does my chatbot not answer correctly?","href":"/help"}]},{"group":"Function Calling","pages":[{"title":"RAG from an External Data Provider","href":"/rag-from-external-data-provider"}]},{"group":"Authentication Webhook","pages":[{"title":"User Identity Verification","href":"/user-identity"}]}]},{"anchor":"API References","icon":"code","pages":[{"title":"API References","href":"/api-reference/api-key-setup"}]}]},"title":"Lead Collection - Chatsistant API","buildId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","deploymentId":"dpl_HcHmUS6i3UwswnTHJUEdcTtwfdTQ","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-D1UCVuPB.js","DynamicMarkdown-Crwq6WG_.js","zoom-image-lightbox-CFBqa0On.js","lightbox-handle-r17bVUz3.js"]}