Portal Community
Use after getOrders: This node is typically called after commerce/getOrders returns a list of order IDs. Call this node once per order ID to retrieve the complete item-level detail required for fulfilment, invoicing, and customer notifications.

When to Use

Configuration

Connection

FieldRequiredDescription
accessTokenRequiredPermanent System User access token from Meta Business Manager. Store in BizFirst Credentials Manager and reference via {{ $credentials.whatsAppToken }}.
phoneNumberIdRequiredNumeric string ID of the WhatsApp Business phone number (e.g. 123456789012345).
apiVersionOptionalMeta Graph API version, e.g. v18.0. Defaults to v18.0.

Operation

FieldRequiredDescription
orderIdRequiredThe WhatsApp order ID to retrieve (e.g. order_112233). Obtained from commerce/getOrders or from an inbound order webhook payload via orderId.

Sample Configuration

{
  "resource": "commerce",
  "operation": "getOrder",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "123456789012345",
  "orderId": "{{ $input.orderId }}"
}

Validation Errors

ErrorCause
accessToken is requiredThe accessToken field is empty or missing.
orderId is requiredThe orderId field is empty or missing.
100 (Meta)The order ID does not exist or the System User does not have access to it.
200 (Meta)Permissions error — the token lacks order management permissions.
190 (Meta)Access token expired or revoked.

Output

Success Port

Fires when Meta returns the full order record. The items array contains one entry per line item. Each item includes the retailer ID (your internal SKU), name, unit price, quantity, and currency.

FieldTypeDescription
successbooleantrue on the success port.
orderIdstringThe WhatsApp order ID confirmed by Meta.
statusstringCurrent order status: pending, shipped, delivered, or cancelled.
createdTimestringISO 8601 timestamp of when the order was placed.
itemsarrayArray of line item objects. Each contains retailer_id, name, unit_price, quantity, and currency.
itemCountintegerTotal number of line items in the order.
estimatedTotalstringEstimated order total in minor currency units.
customerIdstringThe customer's WhatsApp ID (which corresponds to their phone number). Use to send order communications.
errorCodestringEmpty on success.
errorMessagestringEmpty on success.
payloadstringFull raw JSON response from the Meta Graph API.

Error Port

Fires when the order cannot be found or the API call fails.

FieldTypeDescription
successbooleanfalse on the error port.
statusstring"failed" or "error".
errorCodestringMeta error code or BizFirst internal validation code.
errorMessagestringHuman-readable error description.
payloadstringRaw API error response for diagnostics.

Sample Output

{
  "success": true,
  "orderId": "order_112233",
  "status": "pending",
  "createdTime": "2025-05-26T08:12:44Z",
  "items": [
    {
      "retailer_id": "SKU-POLO-M-NAVY",
      "name": "Classic Polo Shirt — Medium — Navy",
      "unit_price": "2999",
      "quantity": 2,
      "currency": "USD"
    },
    {
      "retailer_id": "SKU-CHINO-32-KHAKI",
      "name": "Slim Fit Chinos — 32 — Khaki",
      "unit_price": "4999",
      "quantity": 1,
      "currency": "USD"
    }
  ],
  "itemCount": 2,
  "estimatedTotal": "10997",
  "customerId": "14155552671",
  "errorCode": "",
  "errorMessage": "",
  "payload": "{\"id\":\"order_112233\",\"status\":\"pending\",\"created_time\":\"2025-05-26T08:12:44Z\",\"items\":[...]}"
}

Expression Reference

ValueExpressionNotes
Order ID{{ $output.getOrder.orderId }}Use as the primary key when writing the order to your OMS or database.
Items array{{ $output.getOrder.items }}Pass to a ForEach node to process each line item, or to a Function node to build a fulfilment pick list.
First item SKU{{ $output.getOrder.items[0].retailer_id }}Your internal product SKU. Use to look up the product in your own database for fulfilment.
Customer phone{{ $output.getOrder.customerId }}The customer's WhatsApp phone number. Use as the to field in message/sendTemplate for order confirmation and shipping notifications.
Estimated total{{ $output.getOrder.estimatedTotal }}Minor currency units. Divide by 100 in a Function node for invoice display. Confirm against your pricing system before using as the definitive invoice amount.
Order status{{ $output.getOrder.status }}Use in an IfCondition node to route pending orders to fulfilment, shipped orders to tracking, and delivered orders to satisfaction surveys.
Error code{{ $output.getOrder.errorCode }}Non-empty on error port. A Meta 100 error means the order ID is invalid — log and flag for manual review.

Node Policies & GuardRails

Policy AreaRecommendation
Credential storageAlways store the access token in BizFirst Credentials Manager. Never embed raw tokens in node configuration fields.
Order idempotencyCalling this node multiple times for the same order ID is safe (idempotent read operation). However, always check your OMS for the order ID before submitting it to fulfilment — this node may be retried on transient failures, and duplicate OMS submissions can cause double shipments.
Estimated total vs. actual totalThe estimatedTotal is computed from item prices at the time the order was placed. Always verify against your current pricing database before using as the official invoice amount, as prices may have changed between cart creation and fulfilment.
Customer ID handlingThe customerId is the customer's WhatsApp phone number. This is PII. Store it only in systems with appropriate access controls and data retention policies. Do not log it in plain-text workflow execution logs.
Error port handlingAlways connect the error port. If this node fails inside a ForEach loop processing multiple orders, the loop should log the failure and continue to the next order rather than halting the entire fulfilment run.
Order fulfilmentUse items[].retailer_id (your internal SKU) for all fulfilment lookups, not the WhatsApp product ID. The retailer ID is the stable reference between WhatsApp commerce and your internal product management system.

Examples

Order Fulfilment Submission

{
  "resource": "commerce",
  "operation": "getOrder",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "123456789012345",
  "orderId": "{{ $input.orderId }}"
}

After commerce/getOrders returns a list of pending order IDs, a ForEach node calls this node per order. The full order detail is passed to an HTTP Request node that submits the order to the OMS REST API. The OMS payload is built from {{ $output.getOrder.items }}, {{ $output.getOrder.customerId }}, and {{ $output.getOrder.estimatedTotal }}. On OMS success, the order is logged as submitted in the processed_orders table.

Order Confirmation WhatsApp Message

{
  "resource": "commerce",
  "operation": "getOrder",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "123456789012345",
  "orderId": "{{ $input.orderId }}"
}

A webhook-triggered workflow receives a new order notification and calls this node to get full details. A Function node formats the item list as a readable summary. The workflow then calls message/sendTemplate with to: {{ $output.getOrder.customerId }}, passing the order ID, item count, and estimated total as template variables. The customer receives an order confirmation within seconds of placing the order.

Customer Service Order Lookup

{
  "resource": "commerce",
  "operation": "getOrder",
  "accessToken": "{{ $credentials.whatsAppToken }}",
  "phoneNumberId": "123456789012345",
  "orderId": "{{ $input.extractedOrderId }}"
}

A customer support workflow triggers when a customer sends an inbound message containing text like "where is my order ORD-12345". An entity extraction node parses the order ID from the message text. This node retrieves the order details. A Function node formats the status, item list, and estimated delivery date into a reply. The workflow sends the reply via message/sendText directly in the customer's conversation thread. The error port routes to a "no order found" text message if the ID is invalid.