> ## Documentation Index
> Fetch the complete documentation index at: https://whatsapp-rust.jlucaso.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Business

> Business profile operations - fetch WhatsApp Business account profiles and handle business events

The business API allows you to fetch business profiles for WhatsApp Business accounts, including their description, contact information, categories, and business hours.

## Access

Business profile operations are available directly on the `Client`:

```rust theme={null}
let profile = client.get_business_profile(&jid).await?;
```

## Methods

### get\_business\_profile

Fetch the business profile for a WhatsApp Business account.

```rust theme={null}
pub async fn get_business_profile(
    &self,
    jid: &Jid,
) -> Result<Option<BusinessProfile>, IqError>
```

**Parameters:**

* `jid` - JID of the account to query

**Returns:**

* `Some(BusinessProfile)` if the account is a business with a profile
* `None` if the account is not a business or has no profile

**Example:**

```rust theme={null}
let jid: Jid = "15551234567@s.whatsapp.net".parse()?;

if let Some(profile) = client.get_business_profile(&jid).await? {
    println!("Description: {}", profile.description);
    
    if let Some(email) = &profile.email {
        println!("Email: {}", email);
    }
    
    for site in &profile.website {
        println!("Website: {}", site);
    }
    
    if let Some(addr) = &profile.address {
        println!("Address: {}", addr);
    }
    
    for category in &profile.categories {
        println!("Category: {} (ID: {})", category.name, category.id);
    }
    
    if let Some(tz) = &profile.business_hours.timezone {
        println!("Timezone: {}", tz);
    }
    
    if let Some(configs) = &profile.business_hours.business_config {
        for config in configs {
            println!(
                "  {:?}: {:?} ({:?}–{:?})",
                config.day_of_week,
                config.mode,
                config.open_time,
                config.close_time,
            );
        }
    }
} else {
    println!("Not a business account");
}
```

## Types

### BusinessProfile

```rust theme={null}
#[non_exhaustive]
pub struct BusinessProfile {
    pub wid: Option<Jid>,
    pub description: String,
    pub email: Option<String>,
    pub website: Vec<String>,
    pub categories: Vec<BusinessCategory>,
    pub address: Option<String>,
    pub business_hours: BusinessHours,
}
```

`BusinessProfile` is `#[non_exhaustive]`: struct-literal construction and exhaustive struct destructuring from outside the crate are both disallowed. Field reads are unaffected; add `..` to any exhaustive destructuring patterns.

### BusinessCategory

```rust theme={null}
#[non_exhaustive]
pub struct BusinessCategory {
    pub id: String,
    pub name: String,
}
```

`BusinessCategory` is `#[non_exhaustive]`: struct-literal construction and exhaustive struct destructuring from outside the crate are both disallowed. Field reads are unaffected; add `..` to any exhaustive destructuring patterns.

### BusinessHours

```rust theme={null}
#[non_exhaustive]
pub struct BusinessHours {
    pub timezone: Option<String>,
    pub business_config: Option<Vec<BusinessHoursConfig>>,
}
```

`BusinessHours` is `#[non_exhaustive]`: struct-literal construction and exhaustive struct destructuring from outside the crate are both disallowed. Field reads are unaffected; add `..` to any exhaustive destructuring patterns.

### BusinessHoursConfig

```rust theme={null}
#[non_exhaustive]
pub struct BusinessHoursConfig {
    pub day_of_week: DayOfWeek,
    pub mode: BusinessHourMode,
    pub open_time: Option<u32>,
    pub close_time: Option<u32>,
}
```

`BusinessHoursConfig` is `#[non_exhaustive]`: struct-literal construction and exhaustive struct destructuring from outside the crate are both disallowed. Field reads are unaffected; add `..` to any exhaustive destructuring patterns.

### DayOfWeek

```rust theme={null}
pub enum DayOfWeek {
    Sunday,       // "sun"
    Monday,       // "mon"
    Tuesday,      // "tue"
    Wednesday,    // "wed"
    Thursday,     // "thu"
    Friday,       // "fri"
    Saturday,     // "sat"
    Other(String),
}
```

### BusinessHourMode

```rust theme={null}
pub enum BusinessHourMode {
    Open24H,          // "open_24h"
    SpecificHours,    // "specific_hours"
    AppointmentOnly,  // "appointment_only"
    Other(String),
}
```

## Business events

Business account changes are reported through the event system. Subscribe to `BusinessStatusUpdate` events to track changes:

```rust theme={null}
use wacore::types::events::{Event, BusinessStatusUpdate, BusinessUpdateType};

match event {
    Event::BusinessStatusUpdate(update) => {
        match update.update_type {
            BusinessUpdateType::VerifiedNameChanged => {
                println!("Verified name: {:?}", update.verified_name);
            }
            BusinessUpdateType::ProfileUpdated => {
                println!("Business profile updated for {}", update.jid);
            }
            BusinessUpdateType::RemovedAsBusiness => {
                println!("{} is no longer a business account", update.jid);
            }
            BusinessUpdateType::ProductsUpdated => {
                println!("Products updated: {:?}", update.product_ids);
            }
            BusinessUpdateType::CollectionsUpdated => {
                println!("Collections updated: {:?}", update.collection_ids);
            }
            BusinessUpdateType::SubscriptionsUpdated => {
                println!("Subscriptions: {:?}", update.subscriptions);
            }
            _ => {}
        }
    }
    _ => {}
}
```

See [Events](/concepts/events#businessstatusupdate) for the full `BusinessStatusUpdate` type.

## Checking if a contact is a business

You can check if a contact is a business account using the contacts API:

```rust theme={null}
let results = client.contacts().is_on_whatsapp(&[Jid::pn("15551234567")]).await?;

for result in &results {
    if result.is_business {
        println!("{} is a business account", result.jid);
    }
}
```

See [Contacts API](/api/contacts) for details.

## Automatic business stanza detection

When sending interactive business messages (native-flow buttons for payments, CTAs, catalogs, etc.), the library automatically injects a `<biz>` stanza child node on the outgoing message. This means you can send `InteractiveMessage` with `NativeFlowMessage` content through `send_message` or `send_message_with_options` without manually constructing business protocol nodes.

See [Send API - Automatic business node detection](/api/send#automatic-business-node-detection) for the full list of supported button-to-flow mappings.

## See also

* [Client API](/api/client#get_business_profile) - Client-level business methods
* [Contacts API](/api/contacts) - Check `is_business` flag on contacts
* [Events](/concepts/events#businessstatusupdate) - Business status update events
* [Send API](/api/send#automatic-business-node-detection) - Auto-detected `<biz>` stanza nodes
