WhatsApp object model

All API names carry the b3w__ namespace prefix once installed (shown below without the prefix in the field-name column for readability; the full API name is b3w__<Field>).

Whatsapp_Message__c — the message log

Stores every inbound and outbound message. Sharing model Private; reports and search enabled. Name field is an auto-number, WA-{000000}.

Field (API b3w__…) Type Notes
Contact__c Lookup(Contact) The Contact messaged. Auto-matched for inbound; blank if no/ambiguous match.
Direction__c Picklist Outbound, Inbound.
Message_Type__c Picklist Text, Template, Image, Document, Video, Audio, Other.
Message_Body__c Long Text Area Message text, media caption, or for templates the rendered template text with variables substituted (falls back to the template name if the template can't be fetched).
Status__c Picklist Queued, Sent, Delivered, Read, Failed, Received.
WhatsApp_Message_Id__c Text The wamid from WhatsApp — correlates delivery statuses to the outbound record.
From_Phone_Number__c Text Sender number.
To_Phone_Number__c Text Recipient number.
Phone_Number_Id__c Text The WhatsApp phone-number id that sent/received.
Template_Name__c Text Template used (outbound templates).
Media_Id__c Text WhatsApp media id (inbound or outbound media).
Button_Label__c Text Label of a template URL button, for display in the component.
Button_URL__c URL Resolved URL of a template button, for display in the component.
Error_Message__c Long Text Area API or processing error detail.
Sent_Received_DateTime__c Date/Time When the message was sent or received.

Inbound media is downloaded asynchronously and attached to the record as a Salesforce File (ContentVersion). Sent files from the LWC are attached the same way, so the component can render them in the conversation.

WhatsApp_Configuration__mdt — per-number configuration

Custom Metadata type. Create one record per WhatsApp phone number. The package picks a record by DeveloperName, by phone-number id (inbound), or falls back to the one flagged default.

Field (API b3w__…) Type Notes
WhatsApp_Business_Account_Id__c Text The WABA id (used to list templates).
Phone_Number_Id__c Text The phone-number id (not the display number) — used in the send URL.
Display_Phone_Number__c Text Human-readable number, e.g. +1 555 000 0000, stored as From.
Named_Credential__c Text The Named Credential to call through — normally WhatsApp.
API_Version__c Text Graph API version, e.g. v21.0. Defaults to v21.0 if blank.
Webhook_Verify_Token__c Text Secret echoed during Meta's webhook verification (must match Meta).
Is_Default__c Checkbox Check on exactly one record — the default sending number.

WhatsApp_Message_Event__e — platform event

A high-volume platform event published after commit whenever message records change, so the LWC can refresh live.

Field (API b3w__…) Type Notes
Contact_Id__c Text(18) The Contact whose conversation changed. The LWC filters on this.

Credentials

Component Type Purpose
WhatsApp Named Credential https://graph.facebook.com — send, template and media-metadata calls.
WhatsApp_Media Named Credential https://lookaside.fbsbx.com — downloads inbound media binaries.
WhatsApp External Credential Holds the access token. Custom auth protocol; injects Authorization: Bearer {token} from the Access_Token parameter on the WhatsAppPrincipal named principal.

Both Named Credentials reference the single WhatsApp External Credential, so the access token is entered once and shared across that WABA's phone numbers.

Log_Entry__c — shared error log

Not owned by this package but written to by it. Fields used: Description__c, Category__c, Type__c. Every WhatsApp failure is logged here under the WhatsApp category.

Permission set — WhatsApp_Admin

Grants everything an admin needs to send and manage WhatsApp messages:

Assign it to any user who sends WhatsApp messages or uses the component.

Tab and layouts