User Guide / Integrations

Integrations

Overview

The Integrations module has two sections accessible via tabs at the top of the page: Sources and Website Forms. Together they let you connect external channels to Straightline so that leads flow in automatically — no manual data entry required.


Sources

What is a Source?

A source represents a channel or origin point for your leads — for example, "Website Contact Form", "Google Ads Landing Page", or "Partner Referral". Each source tracks how many leads came in from that channel and lets you associate a First Contact user who will follow up on new leads from that source.

Source Categories

When creating a source, choose the category that best describes its origin:

Category Use for
Facebook Facebook Ads lead forms or pages
Instagram Instagram Ads or profile links
LinkedIn LinkedIn lead gen forms or outreach
Twitter / X Twitter/X campaigns
Website Form Website forms (pair with a Website Form below)
Email Campaign Email marketing campaigns
Other Any channel that does not fit the above

Source Types

Each source has a type that determines what contact data it provides:

  • Link — a tracking URL you embed in ads or posts. Leads from this source are identified by UTM parameters.
  • Code — a snippet of code you embed on a page.
  • Both — provides both a tracking URL and an embed code.

Creating a Source

  1. Go to Integrations → Sources.
  2. Click Add Source.
  3. Enter a name, choose a category and type.
  4. Optionally add a tracking URL, embed code, or usage instructions.
  5. Assign a First Contact — the team member who will be the first to follow up on leads from this source.
  6. Save.

Editing and Disabling

Click Actions → Edit on any source to update its details. If a campaign ends, disable the source rather than deleting it — this preserves the historical lead data while stopping new leads from being attributed to it.

Viewing Source Performance

Click a source name to open its detail page. You will see: - Total leads generated - Recent lead list - Automations linked to this source


Website Forms

What is a Website Form?

A website form is a secure configuration that lets your external website post form submissions directly into Straightline as leads. Each form has a unique Form ID and an API endpoint your site calls when a visitor submits a contact form.

How It Works

  1. You create a Website Form in Straightline and configure which fields are allowed.
  2. You add a small JavaScript snippet to your website.
  3. When a visitor submits your form, the snippet posts the data to Straightline's API.
  4. Straightline validates the submission (origin, honeypot, timing) and creates a new lead automatically.

Creating a Website Form

  1. Go to Integrations → Website Forms.
  2. Click Add Website Form.
  3. Fill in the configuration:
Field Description
Form Name Internal name to identify this form
Linked Source Optional — attributes leads to an existing source
Allowed Origins Comma-separated list of URLs that may post to this form (e.g. https://yoursite.com)
Allowed Fields Comma-separated list of field names your form will send
Field Mapping Map custom field names to Straightline lead fields (e.g. phone_number → phone)
Honeypot Field A hidden field bots will fill; submissions with this field populated are rejected
Minimum Submit Time Submissions arriving faster than this (in ms) are rejected as bots
Require Consent If enabled, submissions must include a consent checkbox field
Active Inactive forms reject all submissions
  1. Save. You will be taken to the form's detail page.

Integrating with Your Website

From the form's detail page, copy your Form ID and the ready-to-use JavaScript snippet. Add the snippet to your site before </body>, then call submitToStraightline() on your form's submit event, passing the field values as a plain object.

The snippet fetches a short-lived security token from the API, then posts the form data. This token prevents direct API abuse without requiring your users to authenticate.

Allowed Origins

Straightline enforces CORS — only requests from the URLs you list in Allowed Origins will be accepted. Include every origin your form may be served from, including localhost addresses if you are testing locally.

Field Mapping

If your form uses different field names than Straightline's lead model (e.g. your form has full_name but Straightline expects name), add a mapping row. Leave fields unmapped if the names already match.

Editing and Deleting

Use Actions → Edit to update any form configuration at any time. Deleting a form is permanent — all configuration is lost, but existing leads captured by the form are preserved.


Tracking Performance

Use the Sources tab to identify which channels drive the most inbound interest. Combine that with the Website Forms submission counts to see which specific forms are converting well.

Tips

  • Give sources and forms descriptive names — "Homepage Contact Form" is more useful than "Form 1".
  • Disable sources that are no longer active rather than deleting them; this keeps historical attribution intact.
  • List all environments in Allowed Origins (staging, production, localhost) when testing.
  • Keep allowed fields to only what you actually collect — extra field names add unnecessary attack surface.