
Who It’s For
Attributes are for any team that wants to move beyond generic broadcasts and support. E-commerce teams use them to storelast_order_id and lifetime_value. Healthcare clinics store appointment_date and insurance_provider. SaaS companies track plan_tier and trial_expires_at. If you’ve ever wished a WhatsApp message could say more than “Hi ”, attributes are the answer.
Attribute Types
Every attribute in Soneka has a fixed data type. Choosing the right type unlocks validation, filtering, and formatting for that field everywhere it’s used.Text
Free-form strings up to 500 characters. Best for names, addresses, notes, or any unstructured value.
Number
Integers or decimals. Supports arithmetic in flows (e.g.,
cart_value > 5000) and formatting in messages.Date
ISO 8601 dates and datetimes. Enables relative filters like “expires in 7 days” and timezone-aware scheduling.
Boolean
True/false flags. Ideal for
opted_in, vip, has_paid, or any binary state you branch on.List
Predefined single-select or multi-select options (e.g.,
plan_tier: [free, pro, enterprise]). Guarantees consistent values.URL
Validated links. Auto-formats as clickable in the inbox and passes safely into template buttons.
System vs Custom Attributes
Soneka ships with a set of system attributes that are populated automatically, and lets you define unlimited custom attributes for anything specific to your business.
System attributes are guaranteed to exist on every contact. Custom attributes are optional per contact — a missing value returns
null rather than an error, and you can set fallbacks in templates.
Creating a Custom Attribute
1
Open the Attributes Library
Navigate to Settings → Contacts → Attributes. You’ll see all existing system and custom attributes, along with their types and usage counts.
2
Click New Attribute
In the top-right, click + New Attribute. Give it a name (lowercase, snake_case is recommended — e.g.,
last_order_total) and a human-friendly label (e.g., “Last Order Total”).3
Pick a Type
Select one of the six types above. For List, add each allowed option on its own line. For Number, choose whether to allow decimals.
4
Set a Default Value (Optional)
Provide a default that Soneka assigns when a new contact is created without an explicit value. Useful for flags like
opted_in: false.5
Choose Visibility
Decide whether agents can edit this attribute from the inbox, or whether it’s system-managed by flows and integrations only. Locking sensitive attributes (like
lifetime_value) prevents accidental edits.6
Save
Click Create Attribute. The field is now available across broadcasts, flows, templates, AI agents, and the inbox sidebar.
Populating Attribute Values
Attributes are only useful if they’re kept fresh. Soneka gives you five ways to write values, and most teams use a combination.Manual edits in the inbox
Manual edits in the inbox
Any agent with permission can update attributes from the contact sidebar during a conversation. Great for ad-hoc updates like address changes or preferences captured verbally.
Flow Builder actions
Flow Builder actions
The Set Attribute node writes a value at any step in a flow. Combine with Ask Question nodes to collect data conversationally — e.g., ask for the customer’s city, then save it into
city.CSV import
CSV import
Bulk-update thousands of contacts by uploading a CSV. Soneka matches on
phone and updates only the columns you include, leaving other attributes untouched.API / webhooks
API / webhooks
POST to
/v1/contacts/{id}/attributes to sync from your CRM, e-commerce platform, or data warehouse. Ideal for real-time updates like last_order_id after checkout.Integrations
Integrations
Shopify, WooCommerce, and Google Sheets integrations map source fields to Soneka attributes automatically. Set the mapping once and updates flow both ways.
Using Attributes in Messages
Attributes drop into any message using double-brace syntax:{{attribute_name}}. Soneka validates references at send time and warns you if a template uses an attribute that doesn’t exist.
Fallbacks
If an attribute might be missing, provide a fallback with the pipe syntax so the message never renders as an awkward blank:name is empty, the message renders as “Hi there, thanks for reaching out!”.
Segmenting with Attributes
Every attribute becomes a filter you can layer in the Audience Builder for broadcasts and flow entry points. Filters combine with AND/OR logic and support ranges, list membership, and “exists / doesn’t exist” checks.
Saved segments update in real time — when a contact’s attributes change, they enter or leave segments automatically without a re-run.
Attributes and AI Agents
AI agents read attributes as part of their context on every reply. This means an agent can greet a returning customer by name, quote the correct plan tier, or refuse to discuss billing with a contact whoseverified flag is false — all without you writing custom prompts for each case.
Best Practices
- Name attributes for their meaning, not their source.
customer_citybeatsshopify_city— you may swap sources later. - Prefer List types over free-text where possible. Consistent values make segments and analytics reliable.
- Use booleans for state, not text.
is_vip: trueis faster to filter thanvip_status: "yes". - Lock down financial and PII attributes. Restrict edit access to admins and integrations only.
- Set defaults for opt-in flags. Never leave
opted_inasnull— it should always betrueorfalse. - Archive unused attributes quarterly. Fewer fields means faster imports and cleaner UX for agents.
Limits
Need more? Enterprise plans lift these ceilings — contact support to discuss your use case.