Conversation
One thread, opened by id or by a contact's phone number.
import { Conversation } from '@wirebird/react';
<Conversation contact={{ phone: '+15125550123', firstName: 'Dana', lastName: 'Lee' }} />;Use Conversation to put a single thread next to a record in your app, such as a customer or a job.
Pass either an existing conversationId or a contact; with a contact, Wirebird opens that person's
thread, creating it if needed.
Props
| Prop | Type | Description |
|---|---|---|
conversationId | string | An existing thread. |
contact | ConversationContact | Or open the thread with this person. |
consentProvidedByPlatform | boolean | Set to true only if your product already collected this person's agreement to receive texts. Skips the consent question before the first text. |
onOpened | (conversationId: string) => void | The thread's id once it's open. Store it to reopen the thread by id later. |
height | number | string | Fixed height, default 640. |
ConversationContact
| Field | Type | Description |
|---|---|---|
phone | string | Required. Their number, with country code (+15125550123). |
firstName | string | |
lastName | string | |
externalId | string | Your id for this person. |
name | string | Deprecated. One full name, split at the first space. Use firstName and lastName. |
Consent
Business texting rules require a record of how each person agreed to receive texts. Before the first
text to a new contact, staff pick how the person agreed. Only pass consentProvidedByPlatform when that
is true in your product (for example, your booking form has an unticked opt-in box the person checked).