# Send Order Status

{% embed url="<https://app.supademo.com/demo/cmmg0tslu5162nr99aocamrgk?utm_source=link>" %}

The **Send Status workflow** allows businesses to automatically send order status updates to customers via **WhatsApp** when the order status changes in **Petpooja POS.**

This automation ensures customers receive real-time updates about their order progress without manual intervention.

The workflow listens to order status events from Petpooja and sends the corresponding WhatsApp message to the customer.

### Overview &#x20;

The **Send Status automation** connects **Petpooja POS events** with **OwnChat Flow Builder.**

Whenever an order status is updated in Petpooja, the workflow triggers and sends a WhatsApp notification to the customer.

#### Workflow Automation Flow &#x20;

Petpooja POS\
&#x20;     ↓\
Order Status Updated\
&#x20;     ↓\
Event Sent to OwnChat\
&#x20;     ↓\
Workflow Triggered\
&#x20;     ↓\
Order Status Condition Evaluated\
&#x20;     ↓\
WhatsApp Status Message Sent

### Prerequisites &#x20;

Before configuring the workflow, ensure the following requirements are met.

#### Required Access &#x20;

You must have access to:

* OwnChat account
* Flow Builder
* Integrations module
* Petpooja POS integration

#### POS Requirements &#x20;

The POS system must capture:

* Customer phone number
* Order ID
* Order status

Without the customer phone number, the status message cannot be delivered.

### Creating a New Workflow &#x20;

#### Step 1: Open Flow Builder &#x20;

1. Log in to **Ownchat**.
2. Navigate to **Flow Builder**.
3. Click **Create New Flow**.

#### Step 2: Enter Workflow Details &#x20;

In the **Create New Flow** window:

1. Enter the name of your workflow in the **Flow Name** field.

Example:

Send Status

2. Click the **Create** button to save and launch the new workflow.

The workflow builder canvas will open.

### Selecting the Petpooja Application &#x20;

To configure the workflow trigger, select the application that sends the event.

#### Step 1: Choose Application &#x20;

1. Click **Petpooja** to integrate the restaurant billing application.

#### Step 2: Select Connection &#x20;

Under the **Connection** section:

1. Choose the required connection.

**Important** &#x20;

The application must first be connected in the **Apps section** before it can be used in the workflow.

After connecting the app, the connection will appear in the workflow configuration.

### Step 3: Select Event &#x20;

After selecting the connection:

1. Choose the event **Send Status.**

The events available include:

* Send Invoice
* Send Status

Select:

Send Status

### Step 4: Save Configuration &#x20;

Click the **Update** button to save the application configuration changes.

This completes the trigger setup.

### Adding Conditional Logic &#x20;

After configuring the trigger, you must define the workflow logic.

#### Step 1: Add Next Action &#x20;

1. Click **Add Action.**
2. Select **If Statement.**

The **If Statement** allows conditional logic based on the order status.

### Configuring the IF Statement &#x20;

#### Step 1: Action Name &#x20;

Enter a descriptive name for the action.

Example:

Check Order Status

This helps identify the action in the workflow.

#### Step 2: Condition Type &#x20;

Select the condition type.

Choose:

OR

This means **any one of the conditions must be true** for the action to proceed.

### Adding Condition Variables &#x20;

To configure the IF condition:

1. Click **Add Variable.**
2. Select the **order status variable** from the Petpooja response.

Example variable:

response.order\_status

#### Selecting Data Type &#x20;

After adding the variable:

1. Choose the **Data Type.**

**Example**:

String

#### Selecting Operator &#x20;

Click the **Operator dropdown.**

Select the comparison condition.

**Example**:

is

This sets the condition for evaluating the order status.

#### Entering Condition Value &#x20;

After selecting the operator:

1. Disable the **Dynamic Value toggle.**
2. Enter the desired **static value**.

Example:

Accepted

This completes the IF statement condition.

#### Saving the IF Condition &#x20;

After configuring the condition:

Click:

Add Action

This creates the conditional logic in the workflow.

#### Sending Session Message for Successful Status &#x20;

If the order status condition is satisfied, the next action is sending a **Session Message.**

### Configuring Session Message &#x20;

#### Step 1: Action Name &#x20;

Enter a descriptive name for the action.

Example:

Send Order Status Message

#### Step 2: Customer Contact Number &#x20;

Enter the **Customer Contact Number** in the provided field.

#### Step 3: Insert Dynamic Phone Number &#x20;

1. Click **Add Variable.**
2. Select the **Customer Phone Number variable.**
3. Insert it into the **Customer Contact Number field**.

Example:

response.customer\_phone

#### Step 4: Insert Customer Name Variable &#x20;

Click **Add Variable** again and insert the **Customer Name variable**.

Example:

response.customer\_name

#### Step 5: Configure Message Text &#x20;

Enter the message in the message field.

Example:

Hi {{customer\_name}}, your order status has been updated successfully.

#### Step 6: Save the Session Message &#x20;

Click:

Add Action

This completes the session message configuration.

### Searching for Workflow Actions &#x20;

To quickly locate actions in the workflow builder:

1. Use the search bar.
2. Enter the action name.
3. Select the required node from the filtered list.

### Verifying the Workflow

Before publishing, review the workflow configuration.

The Flow Builder contains the following sections:

* Summary
* Flow Builder
* History

Use these sections to verify the workflow setup.

### Publishing the Workflow &#x20;

After completing the configuration:

1. Click **Publish**.

Example workflow status:

Send Status – Published

The workflow will now automatically run whenever the **Send Status event** is triggered from Petpooja POS. &#x20;

### Testing the Workflow &#x20;

Before using the workflow in production, perform a test.

#### Steps &#x20;

1. Create a **test order in Petpooja POS.**
2. Update the order status.
3. Verify that:

* The **Send Status event triggers**
* The **workflow runs**
* The **customer receives the WhatsApp status message**

### Troubleshooting &#x20;

#### Workflow Not Triggering &#x20;

Possible reasons:

* Event not subscribed
* Petpooja integration not connected
* Incorrect trigger selected

#### Status Message Not Sent &#x20;

Check the following:

* Customer phone number variable
* Session message configuration
* Workflow publishing status

### Best Practices &#x20;

#### Capture Customer Phone Numbers &#x20;

Ensure the POS system records the customer phone number during order creation.

#### Use Response Variables &#x20;

Always use variables such as:

response

to dynamically map order data.

#### Test Status Updates &#x20;

Run test status updates before enabling the workflow for production.

#### Summary &#x20;

The **Send Status workflow** automatically sends WhatsApp messages when the order status changes in **Petpooja POS**.

The automation works as follows:

1. Petpooja updates order status
2. Send Status event is triggered
3. OwnChat workflow runs
4. Order status condition is evaluated
5. WhatsApp message is sent to the customer

This automation improves **customer communication and order transparency.**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ownchat.app/work-flows/petpooja/send-order-status.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
