LogoLogo
  • Welcome
  • Daily Training Sessions
  • Downloadable Guides
  • What's New?
    • Turn Visitors Into Leads: Add a Lead Capture Form to Your Website
    • Create CMA Presentations from the Search Center
    • Post to Your Instagram Story Directly from Rechat! Craft. Click. Share.
    • Full-Service Mode: Manage Open House Registrations
    • A Simpler Navigation Experience
    • Email Drafts & Impersonation Support in Marketing Center
    • Manage Duplicate Contacts, Simplified
    • Digital Ads
    • Enhanced Account Settings
    • Admin Impersonation for Websites & Presentations
    • Websites & Presentations Have Moved!
    • New Look for New Contacts
    • Introducing ‘History’
    • Fresh Deal Summary
    • Revamped Contact Profiles: Cleaner, Faster, Smarter!
    • Lucy: Your AI Assistant
    • Email Previews
    • Enhanced Placeholders
    • Rechat Marketing Studio
    • Notes on Android
    • Lead Sources & Routing
    • Today Page & Digital Business Card on Android
    • Social Post Building Blocks
    • Improved Deals Profile
    • Google News In Articles
    • Personalized Stickers
    • Holidays in Calendar
    • Refreshed Contact Cards
    • Easier-to-Use Calendar on iPhone
    • Refreshed My Designs
    • Email Quota
    • Simplified Marketing Center Navigation
    • Security Beyond Passwords
    • Pages
    • Introducing Lucy
    • Activity Feed
    • Realtor.com & Zillow Lead Integration
    • Digital Business Card
    • Forms Library
    • Filter & Scroll Contacts
    • Digital Open House on iOS
    • Celebrate Your Contacts
    • Notify Agents of Missing Docs (Admin)
    • Improved Contact Filtering
    • Unsubscribed Contacts
    • Tasks
    • Videos in Email
    • Touch Reminders
    • Email Campaigns
    • Improved Contacts
    • Post to Instagram from Rechat
    • New Navigation Menu
    • Private Forms in Deals
    • GIF Previews in Email
    • All-New Today Page
    • Rechat on iPad
    • Filtering Deals
    • Deals Archiving
    • Impersonate Agents (Admin)
    • Searching Multiple Zip Codes on iOS
    • CSV Imports
    • Marketing Center on iOS
    • Searching Multiple Zip Codes
    • Listing Link Preview on Social Posts
    • Celebrate Your Contacts
    • Filtering Deals
    • Uploading Assets (Admin)
    • Social Links in Agent Profile
    • All-New Property Searches
    • Contacts in Deals
    • Creating Deals
    • Expanded Marketing Center Options
    • Connect Multiple MLSs
    • Making Deals Visible to Admins
    • Customizing Deals (Admins)
    • Cover Photos for Accounts
    • Impersonating Agents (Admin)
    • Personal Recipient Attributes in Email
    • Fluid Text on Forms
    • Seamless Communication on Deals
    • Override Form Fields
    • YouTube & Vimeo Videos in Email
    • Notify Agents on Deals
    • Cover Photos for Accounts
    • Search Deals on iOS
    • Mailing Addresses for Deal Contacts
    • Improved Address Descriptions
    • Marketing Center Search
    • Celebrate Your Contacts
    • August 3
    • All-New Listings Page
    • Improved Flows Experience
    • Redesigned Deals Page
    • Adding Notes to Contacts
    • Simplified Account Activation
    • Board View for Contacts
    • Sharing Marketing Templates
    • Audience Confirmation
    • Property Websites
    • Simpler Deal Creation
    • Contact Tags
    • Daily Email
    • Stock Images in Marketing Center
    • Agent Profile on iOS
    • Adding Events to Calendar
    • Redesigned Listing Page
    • Improved Deals Experience
    • Agent Network
    • Improved Listing Cards
  • Self-Guided Learning
    • 👋Intro & Account Setup
    • ⚡Automate Your Workflows
    • 🏡New Listing
    • 🧑New Buyer
    • 🖥️Marketing Admins
    • 📼On-Demand Onboarding
    • 📼On-Demand Workshops
  • Guides
    • 🚀Getting Started
      • Sign up, Sign in
      • Multi-Factor Authentication
      • Connect to Outlook & Google
      • Upgrade to Agent
      • Add An Email Signature
      • Add Your Headshot
      • Account Settings
      • Get the Mobile Apps
      • Delete Rechat account
    • 📗People
      • Contacts
        • Add Contacts
          • Outlook/Google Sync
            • Auto-Created Contacts
          • Manual Contact
          • Import a CSV Spreadsheet
          • Import Phone Contacts
          • Connect to Lead Sources
            • Realtor.com
            • Zillow
            • Union Street Media
            • Placester
          • Lead Routing
        • Organize Your Contacts
          • Tags
          • Smart Lists
          • Search
          • Managing Duplicates
        • Contact Profile Overview
        • Set Follow-Ups
        • Touch Reminders
        • Client Celebrations
      • Calendar
      • Tasks
      • Inbox
      • Rechat Daily
      • FAQ
      • Email Deliverability
    • 🎉Marketing
      • Marketing Center
        • Email Marketing
          • Newsletters
          • Select a Template
          • Customize Your Email
          • Google News Articles
          • Placeholders
          • Best Practices
          • Send or Schedule
          • Email Quota
          • Campaigns
            • Creating Campaigns
        • Social Marketing
          • Social Post Building Blocks
          • Connecting to Instagram
          • Digital Ads
        • Print Marketing
      • Flows
      • Agent Network
      • Listing Marketing Dashboard
      • Websites
      • Presentations
      • Insights
        • Activity Feed
    • 🌎Searches & Tours
    • ✍️Deals
      • Deal's Dashboard
      • Create a deal
      • Deal Profile View
      • Editing Forms In Rechat
      • Collecting eSignatures
      • Uploading & Splitting Documents
      • Messaging Back-office
      • Managing Listings & Accepting Offers
        • Manage Listing Photos
        • Order Yard Signs
        • Post Open House on MLS
        • Accepting Offers
        • Counter Offer
      • Closing Out Deals
    • 🔮Lucy: Your AI Assistant
    • 🏠Open House Registrations
    • 📱Mobile Sales Machine
      • 🤳Rechat On-The-Go
      • 💬Texts for Leads & Clients
      • 📸Personalized Stickers
  • Appendix
    • Finding Support
    • Brokerage Set Up
      • Account Settings
      • Marketing Templates
        • Template Design Guidelines
        • Understanding Studio
        • Fonts
      • Video Clip Stickers
      • Deals Customization
        • Smart Forms
      • Pages
      • Single Sign On (SS0)
      • Email Delivery
        • DNS Self-Service Setup
        • Setup DNS Records
      • Lead Capture Integration
      • Whitelisting Rechat bot in Cloudflare
      • Import Contacts
      • Connecting to your Listing Pages
      • Adoption Rate Dashboard
    • MLS Coverage
    • Integrations
Powered by GitBook
On this page
  • Requirements
  • Data Structure
  • HTML Form Setup
  • JavaScript for Form Submission
  • Server-Side Considerations

Was this helpful?

  1. Appendix
  2. Brokerage Set Up

Lead Capture Integration

Integrating lead capture functionality into your website allows for seamless collection of lead data through Rechat's API. This guide provides step-by-step instructions and a sample code snippet to facilitate this process.

Requirements

Before proceeding, ensure you have:

  1. URL Endpoint: Contact Rechat's support team to obtain your unique endpoint URL. sample: https://api.rechat.com/leads/channels/dc8bf004-6897-1231-bd0f-8837b426602a/webhook

  2. Web Page: A web page where the lead capture form will be hosted.

  3. Basic Knowledge: Familiarity with HTML and JavaScript

To obtain your URL endpoint, contact our support team.

Data Structure

The Rechat API accepts lead data in JSON, XML (LTS format), or URL-encoded formats. For this example, we'll use a JSON payload with the following potential fields:

  • first_name: string

  • last_name: string

  • email: string

  • phone_number: string

  • tag: string[]

  • lead_source: string

  • note: string

  • address: string

  • referer_url: string

  • listing_number: string

  • agent_emails: string[]

  • source_type: string (required)

Note: All fields are optional with this exception of source_type, which must be specified.

HTML Form Setup

Create a form on your webpage. This form should include input fields corresponding to the data structure provided by Rechat.

Example HTML form:

htmlCopy code<form id="leadCaptureForm">
    <input type="text" id="firstName" placeholder="First Name">
    <input type="text" id="lastName" placeholder="Last Name">
    <input type="email" id="email" placeholder="Email">
    <input type="text" id="phoneNumber" placeholder="Phone Number">
    <!-- Include other fields as needed -->
    <button type="submit">Submit</button>
</form>

JavaScript for Form Submission

Use JavaScript to handle form submission and send data to the Rechat API.

Example JavaScript code:

javascriptCopy codedocument.getElementById('leadCaptureForm').addEventListener('submit', function(event) {
    event.preventDefault();

    // Construct the payload
    var payload = {
        first_name: document.getElementById('firstName').value,
        last_name: document.getElementById('lastName').value,
        email: document.getElementById('email').value,
        phone_number: document.getElementById('phoneNumber').value,
        // Include other fields as needed
    };

    // Send the payload to Rechat API
    fetch('https://api.rechat.com/leads/channels/dc8bf004-6897-4d7b-bd0f-8837b426602a/webhook', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
        },
        body: JSON.stringify(payload),
    })
    .then(response => {
        if (response.status === 204) {
            console.log('Lead submitted successfully');
            // Handle successful submission (e.g., display a thank you message)
        } else {
            console.error('Failed to submit lead');
            // Handle errors (e.g., display an error message)
        }
    })
    .catch(error => console.error('Error:', error));
});

Server-Side Considerations

If your website requires additional server-side processing or if you prefer to keep API keys confidential, you may want to handle the API request on the server side. In this case, modify your server's endpoint to accept form submissions and forward the data to Rechat's API.

PreviousSetup DNS RecordsNextWhitelisting Rechat bot in Cloudflare

Last updated 11 months ago

Was this helpful?

4KB
LeadCapture.html
Sample HTML page