Menu · Build with AI
Build with AI

Prompt: send leads to your CRM

Wire the tour, contact and registration forms to Follow Up Boss, Sierra Interactive or Sure Send through your own server route.

View as Markdownopenapi.json

This prompt connects the forms to your CRM through your own server route, following your CRM's page.

The prompt

Prompt
Read RUUSTER_IDX.md first and follow its MUST and NEVER rules. Ask me if it doesn't cover something.

Send my site's leads to my CRM, following <https://help.ruuster.com/idx/recipe-forms> and the page for my CRM: <https://help.ruuster.com/idx/crm-follow-up-boss>, <https://help.ruuster.com/idx/crm-sierra> or <https://help.ruuster.com/idx/crm-sure-send>. My CRM is: [Follow Up Boss, Sierra Interactive or Sure Send]. Wire the TourForm, ContactForm and RegistrationForm components to my own server route, which validates the submission, drops it when the honeypot is filled, requires the contact consent box, and sends it with the @ruuster/idx/crm helpers. The consent box and the separate alerts box start unchecked. The lead source is SITE_NAME.

Use these environment variables: SITE_NAME, SITE_ORIGIN and my CRM's keys (FUB_API_KEY, FUB_SYSTEM, FUB_SYSTEM_KEY and FUB_COOKIE_SECRET for Follow Up Boss, SIERRA_API_KEY for Sierra Interactive, SURESEND_API_KEY for Sure Send). CRM keys stay on the server. Never paste a secret key or a CRM key into a chat, and never put one in browser code, a URL or a log.

Each route answers the form with a full sentence it can show, as the messages table on <https://help.ruuster.com/idx/crm-overview> does: 200 when sent, 403 from another site, 400 for a body it can't read, 422 for a missing contact or consent, 429 with Retry-After when the CRM asks to wait, 500 when a key or SITE_NAME is missing, and 502 when the CRM refuses. For Follow Up Boss, also build the listing-view route (POST /api/activity/fub with the ReportListingView component on the listing page), which sends one Viewed Property per registered visitor, listing and day. For Sierra Interactive and Sure Send there is no listing-view route.

When you are done, walk me through sending one test lead from a listing page and finding it in my CRM.

What it builds

  • your CRM's route under app/api/leads/ and lib/crm.ts, which validate each lead and send it
  • the forms posting to that route, with both consent boxes unchecked
  • your CRM keys read from .env.local on the server only

How to check it

  1. Send a test tour request from a listing page with your own email address, and find the person in your CRM with the listing attached and your site's name as the source.
  2. Submit with the consent box unchecked: the button stays off.
  3. Search your browser bundle for your CRM key: it is not there.

Before you paste it

Follow the setup on Build it with your AI coding assistant once: RUUSTER_IDX.md at the root of your project, the two lines in CLAUDE.md or AGENTS.md, and your keys in .env.local. Never paste a secret key into a chat. Replace the text in square brackets with your own before you send the prompt.