# Set up TextForm for an Opt-in Flow

> Configure the lead’s message and install the TextForm widget on your website.

ShowBoss TextForm is a text button for your website: a lead taps it and texts you, which starts your Opt-in Flow. In the **TextForm** popup, settings are on the left, in **Content**, **Style** and **Install** tabs, and a live preview is on the right, with the text leads send under it. **Save** is at the top right, and **Tutorial** beside the title walks through it. The popup fits your window; on a short screen only the settings scroll. The preview fills in a sample name, and choosing a channel there shows a small sample QR code, with a ShowBoss note on the left on how it works for leads, instead of preparing a real message.

## TextForm setup

1. Publish the workflow with a Persona chosen in **Flow settings**. If you chose the Persona after publishing, publish again. Until then, TextForm's switch and **Edit** are greyed out on the **Start** step, and the step still needed shows under it. Then select **Start** and, under **Triggers**, choose **Edit** (the pencil) beside **TextForm** or turn on its switch.
2. On the **Content** tab, set the **Title** (it starts as **Get an instant demo**), then write the **Message**. The **Name** shows as a chip; add it from the variable button. The message always ends with a locked chip with a lock icon: **My code is:** and a short code, such as `SBAI08`, that ShowBoss adds so it knows which flow the text is for. You can't remove or edit that chip, and you never set or change the code. Set **Name field** to **Hidden** (no name asked), **Optional** (a name field leads can skip) or **Required** (they must enter it). Optional and Required add the Name to the message if it isn't there; Hidden removes it. **Email field** works the same way, but the email is saved on the lead and not added to the message. Under the preview, the message shows as a sent text bubble, the way leads send it.
3. On the **Style** tab, style the card for your site. Set a colour for the **Background**, the **Fields** (shown while leads see a name or email field), the **Text message button** and the **WhatsApp button** (type a hex code such as `#E11D48`, or click the swatch to use the picker; leave it empty for the default). Under **Font**, choose **Figtree**, **Fraunces** or **System**. **System** uses the visitor’s device font. Widgets set to a font outside this list now use **System**. Set **Corners** in pixels (0–40). For the card's edge, set a **Border** width in pixels (0–8; above 0 you can also set its colour) and a **Shadow** (**None**, **Soft** or **Strong**). Set the **Title size** in pixels (16–40) and **Title align** (**Left**, **Center** or **Right**). Text and fields switch between light and dark so they stay readable on your background. The **Powered by strip** at the bottom of the card is **Light** or **Dark**, as you choose; your background colour doesn't change it. Style is written into the embed code, so after changing it, copy the embed code again and replace it on your site. A **Style changed** reminder shows on the Style tab until you copy it again.

   ![TextForm popup on the Style tab, with the live preview and the colour settings highlighted](https://app.showboss.ai/help/shots/message-us-opt-in-style-light.webp)

4. On the **Install** tab, choose **Copy embed code** and paste it into your website's custom HTML block. Copying saves valid unsaved changes first. A green note under the button confirms it was copied. Include the complete script so the card resizes automatically. **More** has **Copy headless API** for a custom form.
5. Test by choosing a channel and sending the prepared message. A name field appears only when your message includes the Name, and an email field only when **Email field** isn't Hidden; fill in any that are required first. On desktop, open the link or scan the QR with a phone. Confirm the conversation appears in **Inbox**.

![TextForm popup on the Content tab with the Title, Message, Name field and Email field numbered, and the text leads send under the preview](https://app.showboss.ai/help/shots/message-us-opt-in-setup-light.webp)

The email field shows in the preview and on your site, but ShowBoss doesn't store the email on the lead yet.

`{{full_name}}` remains available when the name is optional. You do not need a confirmation-page origin, booking-phone parameter, appointment, or webhook.

If an incoming opt-in cannot be attached safely to a conversation, check **TextForm needs review** in the organization Inbox (see [Handle TextForm reviews](https://app.showboss.ai/help/use-the-inbox#handle-textform-reviews)). The review keeps the sender and message for manual follow-up; marking it handled does not start the flow.

## Website installation

On the **Install** tab, choose **Copy embed code** and paste the complete snippet into a custom HTML block that allows scripts. The tab is there before the first save: copying saves your settings first, and the first save turns TextForm on.

On a desktop browser, TextForm shows **iMessage** on a Mac and **Text message** on other computers when the workflow has an eligible BlueBubbles receiving line, and WhatsApp when it has an eligible WhatsApp sender. After the visitor enters a name when the template asks for one and chooses a channel, they can open the prepared message on that computer or scan the displayed QR with a phone. **Open on this device** opens the prepared link in a new tab or window, or hands it to the installed messaging app, while keeping the embedded form in place. The QR contains the same prepared link as the button. It remains usable after the browser visit; a visitor who scans an older QR can edit the name in their message before sending. An available BlueBubbles line appears as **iMessage** on iPhone, iPad and Mac when the line supports iMessage, and as **Text message** elsewhere. The Text link uses an `sms:` address so a phone can open its messaging app; BlueBubbles handles the actual iMessage, RCS, MMS, or SMS transport. Some phone camera apps may require the visitor to confirm before opening a messaging app. WhatsApp remains a separate option. If no compatible channel is available, the card says messaging is unavailable.

The button chooses how to open a prepared message; the phone's messaging app may send it as iMessage, RCS, MMS, or SMS. A valid sent message can start the flow on any of those text transports or on WhatsApp. ShowBoss records the transport that actually delivered the message. The recipient number and the code after **My code is:** must stay in the message.

The **Powered by ShowBoss** strip at the bottom, light or dark as set on the **Style** tab, opens the ShowBoss website in a new tab or window.

The embed shows only the card, with a transparent surrounding background. They fit the available width up to **544px**; put the embed inside your own div to set a narrower width, add spacing, center it, or choose a background. Styles on that div control the surrounding layout, not the fields and buttons inside the iframe.

The iframe matches the card’s actual height, without a fixed minimum, and grows or shrinks with its content, including a desktop QR code. Paste the complete copied snippet, including the script, into a website HTML block that allows JavaScript. If you previously pasted only an iframe, replace it with the current **Copy embed code** snippet to enable resizing. A page builder that removes scripts cannot resize the iframe automatically.

## When to use the headless API

Use **Copy embed code** for the ready-made widget with its optional name field, channel buttons, resizing, and desktop QR code. Choose **Copy headless API** when your developer needs full control over the form or wants to integrate TextForm into an existing page experience. Your custom interface must handle input, available channels, messaging links, loading states, and errors.

### How to use the headless API

The copied example contains your installation key and endpoint URLs. It demonstrates availability and describes permanent-link preparation; it is not a complete, ready-to-paste form.

1. Set up TextForm and save any custom configuration. Copy the headless API example into your website's JavaScript implementation.
2. Set `device_hint` to `apple`, `android`, `desktop`, or `other` for the visitor's device; this variable must be defined before running the example.
3. Send a JSON POST to the copied `/v1/message-us/availability` URL with `installation_key` and `device_hint`. Use `Content-Type: application/json` and `credentials: "omit"`. Render the returned `widget_title`, apply `widget_theme`, and show its channel choices. Collect a name when `full_name_available` is true, and require it only when `full_name_required` is true; otherwise send it as `null` or omit it.
4. On a channel click, send a JSON POST to `/v1/message-us/permanent-link` on the same host with `installation_key`, `device_hint`, optional `full_name`, and `channel`. Use the same headers and credentials setting. The channel is one of the returned values: `imessage`, `sms`, or `whatsapp`.
5. On success, use the returned `deep_link` to open the prepared message. On desktop, you can also generate a QR code containing that exact link. Show the returned `message` if your design includes a preview. Preserve the code after **My code is:** and any name text; do not construct the message or recipient yourself. The prepared message contains only the configured template text.
6. The visitor still needs to send the message in their messaging app. Calling the API alone does not start the flow. Test with a controlled lead and confirm the incoming message and workflow activity in **Inbox**.

### Retries, channel changes, and errors

Check HTTP success before using the response. Show a retry or unavailable state for failed requests and prevent repeated clicks while a request is pending. If availability returns no channels, do not show an active send button.

Retry the same preparation request after a network failure. If the visitor changes channels or edits their name, request a link again with the new values. The returned link and QR have no expiration; each new send is a separate incoming message. If the installation key is rotated, update your custom integration with the new key.

## Embed code and installation key

**Copy embed code** includes the iframe and its supporting script. Paste the complete snippet so the card resizes automatically.

**Rotate installation key**, under **More**, replaces the key used by website embeds. After rotating, copy fresh embed code into each website installation. Previously prepared messaging links and QR codes keep their fixed code.

---

Source: https://app.showboss.ai/help/message-us-opt-in (last verified 2026-11-22)
