# Signals

> Read your Return Signals conversations, customer data, orders, product catalog and analytics.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/signals

## Actions

### Get campaign sequence analytics and observed Shopify redemption signals

Get campaign sequence analytics and observed Shopify redemption signals. OAuth minimum role: viewer.

**Inputs**

- Start date (`start_date`, date): Inclusive start date in the reporting timezone (defaults to a 30-day window)
- End date (`end_date`, date): Inclusive end date in the reporting timezone (defaults to today)
- Tz (`tz`, text): IANA timezone (e.g. America/New_York) used to resolve day windows and bucket daily analytics. Defaults to America/Los_Angeles.

**Outputs**

- `data` (object): Response for GET /organizations/{org_id}/analytics/campaigns.

**Example output**

```json
{
  "data": {
    "period_end": "2026-11-30T12:00:00Z",
    "period_start": "2026-11-30T12:00:00Z",
    "recent_activity": [
      {
        "campaign_sequence_id": "sample_campaign_sequence_id",
        "campaign_sequence_key": "Example",
        "campaign_sequence_name": "Example",
        "campaign_sequence_step_id": "sample_campaign_sequence_step_id",
        "campaign_sequence_step_run_id": "sample_campaign_sequence_step_run_id",
        "conversation_id": "sample_conversation_id",
        "customer_id": "sample_customer_id",
        "customer_name": "Example",
        "customer_phone": "Example",
        "event_at": "2026-11-30T12:00:00Z",
        "message_status": "Example",
        "scheduled_for": "2026-11-30T12:00:00Z",
        "sent_at": "2026-11-30T12:00:00Z",
        "skip_reason": "Example",
        "status": "Example",
        "step_key": "Example",
        "step_label": "Example"
      }
    ],
    "sequences": [
      {
        "campaign_sequence_id": "sample_campaign_sequence_id",
        "created_at": "2026-11-30T12:00:00Z",
        "description": "Example",
        "discount_codes": {
          "assigned": 1,
          "available": 1,
          "status_counts": {},
          "total": 1
        },
        "enrollment_funnel": {
          "blocked_by_active_enrollment": 1,
          "blocked_reason_counts": {},
          "eligible_without_enrollment": 1,
          "enrolled": 1,
          "enrollment_rate": 1,
          "not_enrolled": 1,
          "source_first_order_checkins": 1
        },
        "enrollment_status_counts": {},
        "key": "Example",
        "lifetime_step_run_status_counts": {},
        "name": "Example",
        "performance": {
          "discount_redemption_amount_cents": 1,
          "discount_redemption_count": 1,
          "discount_redemption_order_value_cents": 1,
          "observed_orders_after_send_count": 1,
          "observed_orders_after_send_value_cents": 1,
          "period_codes_shared": 1,
          "period_failed": 1,
          "period_pending": 1,
          "period_replied": 1,
          "period_reply_contacts": 1,
          "period_reply_rate": 1,
          "period_sent": 1,
          "period_skipped": 1
        },
        "period_first_scheduled_at": "2026-11-30T12:00:00Z",
        "period_first_sent_at": "2026-11-30T12:00:00Z",
        "period_last_scheduled_at": "2026-11-30T12:00:00Z",
        "period_last_sent_at": "2026-11-30T12:00:00Z",
        "period_message_status_counts": {},
        "period_skip_reason_counts": {},
        "period_step_run_status_counts": {},
        "priority": 1,
        "status": "Example",
        "steps": [
          {}
        ],
        "updated_at": "2026-11-30T12:00:00Z",
        "version": 1
      }
    ],
    "summary": {
      "active_campaigns": 1,
      "active_enrollments": 1,
      "assigned_discount_codes": 1,
      "available_discount_codes": 1,
      "discount_redemption_amount_cents": 1,
      "discount_redemption_count": 1,
      "discount_redemption_order_value_cents": 1,
      "enrollment_funnel": {
        "blocked_by_active_enrollment": 1,
        "blocked_reason_counts": {},
        "eligible_without_enrollment": 1,
        "enrolled": 1,
        "enrollment_rate": 1,
        "not_enrolled": 1,
        "source_first_order_checkins": 1
      },
      "observed_orders_after_send_count": 1,
      "observed_orders_after_send_value_cents": 1,
      "pending_step_runs": 1,
      "period_codes_shared": 1,
      "period_failed": 1,
      "period_pending": 1,
      "period_replied": 1,
      "period_reply_contacts": 1,
      "period_reply_rate": 1,
      "period_sent": 1,
      "period_skipped": 1,
      "total_campaigns": 1
    }
  }
}
```

### Get conversation details with a cursor-paginated message page

Get conversation details with a cursor-paginated message page. Includes a cursor-paginated transcript: pass message_limit and then messages_before=messages_page.next_before_message_id. There is no batch-transcript or agent-activity REST equivalent. OAuth minimum role: viewer.

**Inputs**

- Conv (`conv_id`, text, required): Conversation within the selected organization; conv_ followed by a ULID.
- Message limit (`message_limit`, number): Number of newest messages to return for this page. From 1 to 100. Default: `30`.
- Messages before (`messages_before`, text): Message ID cursor for loading older messages. Pass messages_page.next_before_message_id from the previous response.

**Outputs**

- `data` (object): Full conversation with messages.

**Example output**

```json
{
  "data": {
    "channels": [
      {
        "address": "Example",
        "channel_id": "sample_channel_id",
        "closed_at": "2026-11-30T12:00:00Z",
        "display_name": "Example",
        "endpoint_id": "sample_endpoint_id",
        "endpoint_status": "active",
        "is_current": false,
        "kind": "sms",
        "opened_at": "2026-11-30T12:00:00Z",
        "provider": "sample_provider",
        "replaced_by_channel_id": "sample_replaced_by_channel_id",
        "status": "active"
      }
    ],
    "checkin_scheduled_for": "2026-11-30T12:00:00Z",
    "conversation_id": "sample_conversation_id",
    "created_at": "2026-11-30T12:00:00Z",
    "current_channel": {
      "address": "Example",
      "channel_id": "sample_channel_id",
      "closed_at": "2026-11-30T12:00:00Z",
      "display_name": "Example",
      "endpoint_id": "sample_endpoint_id",
      "endpoint_status": "active",
      "is_current": false,
      "kind": "sms",
      "opened_at": "2026-11-30T12:00:00Z",
      "provider": "sample_provider",
      "replaced_by_channel_id": "sample_replaced_by_channel_id",
      "status": "active"
    },
    "customer_email": "Example",
    "customer_id": "sample_customer_id",
    "customer_name": "Example",
    "customer_phone": "Example",
    "follow_up_scheduled_for": "2026-11-30T12:00:00Z",
    "klaviyo_ticket_url": "Example",
    "messages": [
      {
        "annotations_status": "pending",
        "channel": {
          "address": "Example",
          "channel_id": "sample_channel_id",
          "closed_at": "2026-11-30T12:00:00Z",
          "display_name": "Example",
          "endpoint_id": "sample_endpoint_id",
          "endpoint_status": "active",
          "is_current": false,
          "kind": "sms",
          "opened_at": "2026-11-30T12:00:00Z",
          "provider": "sample_provider",
          "replaced_by_channel_id": "sample_replaced_by_channel_id",
          "status": "active"
        },
        "content": "Example",
        "created_at": "2026-11-30T12:00:00Z",
        "direction": "inbound",
        "generated_by_model": "Example",
        "media": [
          {}
        ],
        "message_id": "sample_message_id",
        "provider_service": "imessage",
        "reactions": [
          {}
        ],
        "send_failure": {
          "code": "customer_suppressed",
          "delivery_outcome": "not_sent",
          "message": "Example",
          "provider_error_code": "enqueue_failed",
          "requires_follow_up": false
        },
        "sent_at": "2026-11-30T12:00:00Z",
        "sent_by_user_display_name": "Example",
        "sent_by_user_id": "sample_sent_by_user_id",
        "sent_by_user_is_superadmin": false,
        "speaker": "customer",
        "status": "pending"
      }
    ],
    "messages_page": {
      "has_more": false,
      "limit": 1,
      "next_before_message_id": "sample_next_before_message_id"
    },
    "ownership": {
      "claimed_at": "2026-11-30T12:00:00Z",
      "external_user_id": "sample_external_user_id",
      "owner_display_name": "Example",
      "owner_email": "Example",
      "owner_user_id": "sample_owner_user_id",
      "source": "signals",
      "updated_at": "2026-11-30T12:00:00Z",
      "version": 1
    },
    "status": "automated",
    "tags": [
      {
        "conversation_tag_id": "sample_conversation_tag_id",
        "created_at": "2026-11-30T12:00:00Z",
        "source": "system",
        "tag_key": "Example",
        "tag_value": "Example",
        "updated_at": "2026-11-30T12:00:00Z"
      }
    ],
    "updated_at": "2026-11-30T12:00:00Z",
    "warehouse_cancellation_confirmations": [
      {
        "contact_email": "Example",
        "conversation_id": "sample_conversation_id",
        "created_at": "2026-11-30T12:00:00Z",
        "email_sent_at": "2026-11-30T12:00:00Z",
        "outbound_body_text": "Example",
        "outbound_subject": "Example",
        "reply_body_text": "Example",
        "reply_classification": "confirmed",
        "reply_classification_summary": "Example",
        "reply_from_email": "Example",
        "reply_received_at": "2026-11-30T12:00:00Z",
        "shopify_order_id": "sample_shopify_order_id",
        "shopify_order_name": "Example",
        "status": "pending",
        "timeout_at": "2026-11-30T12:00:00Z",
        "warehouse_cancellation_confirmation_id": "sample_warehouse_cancellation_confirmation_id",
        "workflow_type": "post_cancel_confirmation"
      }
    ]
  }
}
```

### Get customer detail

Read contact details, current marketing-consent evidence, linked conversation summary and active experiment enrollment for one organization customer. A customer outside this organization is unavailable. The complete response requires customer, conversation and order read scopes. OAuth minimum role: viewer.

**Inputs**

- Customer (`customer_id`, text, required): Customer within the selected organization; cust_ followed by a ULID.

**Outputs**

- `data` (object): Full customer detail.

**Example output**

```json
{
  "data": {
    "conversation_id": "sample_conversation_id",
    "created_at": "2026-11-30T12:00:00Z",
    "customer_id": "sample_customer_id",
    "email": "Example",
    "experiment_enrollment": {
      "arm": "treatment",
      "enrolled_at": "2026-11-30T12:00:00Z",
      "experiment_id": "sample_experiment_id",
      "experiment_name": "Example",
      "experiment_status": "active",
      "is_override": false
    },
    "first_name": "Example",
    "last_name": "Example",
    "latest_conversation_summary": "Example",
    "marketing_consent": {
      "sms_observed_at": "2026-11-30T12:00:00Z",
      "sms_source": "Example",
      "sms_status": "subscribed",
      "sources": [
        {
          "channel": "Example",
          "observed_at": "2026-11-30T12:00:00Z",
          "source": "Example",
          "source_reference": "Example",
          "source_updated_at": "2026-11-30T12:00:00Z",
          "status": "subscribed"
        }
      ]
    },
    "order_count": 1,
    "outreach_preferences_source": "Example",
    "outreach_preferences_source_message_id": "sample_outreach_preferences_source_message_id",
    "outreach_preferences_text": "Example",
    "outreach_preferences_updated_at": "2026-11-30T12:00:00Z",
    "phone": "Example",
    "shopify_customer_id": "sample_shopify_customer_id",
    "updated_at": "2026-11-30T12:00:00Z"
  }
}
```

### Get live-computed engagement analytics for an organization

Get live-computed engagement analytics for an organization. OAuth minimum role: viewer.

**Inputs**

- Tz (`tz`, text): IANA timezone (e.g. America/New_York) used to resolve day windows and bucket daily analytics. Defaults to America/Los_Angeles.
- Start date (`start_date`, date): Inclusive start date in the reporting timezone
- End date (`end_date`, date): Inclusive end date in the reporting timezone
- Days (`days`, number): Last N reporting-timezone days ending on end_date or today. From 1 to 366.

**Outputs**

- `data` (object): Unified engagement analytics payload.

**Example output**

```json
{
  "data": {
    "attribution_window_hours": 1,
    "channels": [
      {
        "address": "Example",
        "channel_key": "Example",
        "cohorts": [
          {}
        ],
        "display_name": "Example",
        "estimated_llm_cost_usd": 1,
        "kind": "Example",
        "organization_id": "sample_organization_id",
        "provider": "sample_provider",
        "status": "Example"
      }
    ],
    "daily": [
      {
        "date": "2026-11-30",
        "inbound_order_count": 1,
        "inbound_order_value_cents": 1,
        "inbound_replied": 1,
        "inbound_started": 1,
        "observed_order_count": 1,
        "observed_order_value_cents": 1,
        "outreach_order_count": 1,
        "outreach_order_value_cents": 1,
        "outreach_replied": 1,
        "outreach_started": 1
      }
    ],
    "end_date": "2026-11-30",
    "llm_cost": {
      "cached_input_tokens": 1,
      "coverage": {
        "complete": false,
        "cutover_at": "2026-11-30T12:00:00Z",
        "estimated_calls": 1,
        "estimated_usd": "Example",
        "incomplete_reasons": [
          "Example"
        ],
        "issues": [
          "Example"
        ],
        "observed_at": "2026-11-30T12:00:00Z",
        "requested_end": "2026-11-30T12:00:00Z",
        "requested_start": "2026-11-30T12:00:00Z",
        "source_read_through": "2026-11-30T12:00:00Z",
        "unattributed_calls": 1,
        "unknown_calls": 1
      },
      "daily": [
        {
          "date": "2026-11-30",
          "estimated_cost_usd": 1,
          "total_tokens": 1,
          "usage_count": 1
        }
      ],
      "estimated_cost_usd": 1,
      "total_tokens": 1,
      "usage_count": 1
    },
    "llm_cost_conversation_cohorts": [
      "inbound"
    ],
    "maturation": [
      {
        "cohort": "outreach",
        "points": [
          {}
        ]
      }
    ],
    "organization_id": "sample_organization_id",
    "organization_name": "Example",
    "organizations": [
      {
        "estimated_llm_cost_usd": 1,
        "inbound_replied": 1,
        "inbound_reply_rate": 1,
        "inbound_started": 1,
        "observed_order_count": 1,
        "observed_order_value_cents": 1,
        "organization_id": "sample_organization_id",
        "organization_name": "Example",
        "outreach_replied": 1,
        "outreach_reply_rate": 1,
        "outreach_started": 1,
        "return_or_exchange_completed": 1,
        "return_started": 1,
        "widget_attributed_conversations": 1,
        "widget_sessions": 1
      }
    ],
    "rollups_computed_at": "2026-11-30T12:00:00Z",
    "start_date": "2026-11-30",
    "timezone": "Example",
    "totals": [
      {
        "bot_responded": 1,
        "catalog_assist": 1,
        "cohort": "outreach",
        "conversation_issue": 1,
        "conversations_started": 1,
        "human_responded": 1,
        "observed_order_conversations": 1,
        "observed_order_count": 1,
        "observed_order_value_cents": 1,
        "replied": 1,
        "reply_rate": 1,
        "return_or_exchange_completed": 1,
        "return_started": 1,
        "widget_attributed": 1
      }
    ],
    "widget": {
      "attributed_conversations": 1,
      "channels": [
        {
          "address": "Example",
          "attributed_conversations": 1,
          "channel_key": "Example",
          "display_name": "Example",
          "estimated_llm_cost_usd": 1,
          "handling": [
            {}
          ],
          "intents": [
            {}
          ],
          "kind": "Example",
          "observed_order_conversations": 1,
          "observed_order_count": 1,
          "observed_order_value_cents": 1,
          "provider": "sample_provider",
          "return_or_exchange_completed": 1,
          "return_started": 1,
          "session_conversion_rate": 1,
          "status": "Example",
          "widget_sessions": 1
        }
      ],
      "daily": [
        {
          "attributed_conversations": 1,
          "date": "2026-11-30",
          "inbound_first_conversations": 1,
          "observed_order_value_cents": 1,
          "widget_sessions": 1
        }
      ],
      "handling": [
        {
          "conversation_count": 1,
          "handling": "answered_by_ai"
        }
      ],
      "inbound_first_conversations": 1,
      "intents": [
        {
          "conversation_count": 1,
          "intent": "product_question"
        }
      ],
      "observed_order_conversations": 1,
      "observed_order_count": 1,
      "observed_order_value_cents": 1,
      "page_daily": [
        {
          "attributed_conversations": 1,
          "date": "2026-11-30",
          "page_url": "Example",
          "widget_sessions": 1
        }
      ],
      "return_or_exchange_completed": 1,
      "return_started": 1,
      "session_conversion_rate": 1,
      "top_pages": [
        {
          "attributed_conversations": 1,
          "estimated_llm_cost_usd": 1,
          "handling": [
            {}
          ],
          "intents": [
            {}
          ],
          "observed_order_count": 1,
          "observed_order_value_cents": 1,
          "page_url": "Example",
          "session_conversion_rate": 1,
          "widget_sessions": 1
        }
      ],
      "widget_sessions": 1
    }
  }
}
```

### Get order detail with line items

Read customer contacts and line items for one Shopify order, with delivery/check-in state and its latest managed or external return-case summary. order_id is the Shopify order ID; customer_id in the response is a Signals identifier. Requires both order and customer read scopes. OAuth minimum role: viewer.

**Inputs**

- Order (`order_id`, text, required): Shopify order identifier

**Outputs**

- `data` (object): Full order detail with line items.

**Example output**

```json
{
  "data": {
    "check_in_sent": false,
    "check_in_skip_reason": "contact_history_reset",
    "checkin_scheduled_for": "2026-11-30T12:00:00Z",
    "conversation_id": "sample_conversation_id",
    "created_at": "2026-11-30T12:00:00Z",
    "customer_email": "Example",
    "customer_id": "sample_customer_id",
    "customer_name": "Example",
    "customer_phone": "Example",
    "delivered_at": "2026-11-30T12:00:00Z",
    "latest_return_case": {
      "approved_resolutions": [
        "Example"
      ],
      "created_at": "2026-11-30T12:00:00Z",
      "origin": "Example",
      "return_case_id": "sample_return_case_id",
      "shipment_status": "Example",
      "status": "Example",
      "tracking_code": "Example",
      "warehouse_name": "Example"
    },
    "line_items": [
      {
        "issue": {
          "categories": [
            "Example"
          ],
          "issue_id": "sample_issue_id",
          "originated_from_conversation": false,
          "outcome": "kept"
        },
        "price_cents": 1,
        "product_image_url": "Example",
        "quantity": 1,
        "shopify_line_item_id": "sample_shopify_line_item_id",
        "shopify_product_id": "sample_shopify_product_id",
        "sku": "Example",
        "title": "Example",
        "variant_title": "Example"
      }
    ],
    "shopify_order_id": "sample_shopify_order_id",
    "shopify_order_name": "Example"
  }
}
```

### Get product detail

Get product detail. OAuth minimum role: viewer.

**Inputs**

- Product (`product_id`, text, required): Shopify product ID

**Outputs**

- `data` (object): Product detail including potentially large normalized CMS content.

**Example output**

```json
{
  "data": {
    "availability_status": "in_stock",
    "available_for_sale": false,
    "care_summary": "Example",
    "content_sections": [
      {
        "items": [
          "Example"
        ],
        "key": "Example",
        "text": "Example",
        "title": "Example"
      }
    ],
    "content_source": "shopify",
    "content_updated_at": "2026-11-30T12:00:00Z",
    "created_at": "2026-11-30T12:00:00Z",
    "description_text": "Example",
    "image_url": "Example",
    "inventory_quantity": 1,
    "issue_count": 1,
    "material_summary": "Example",
    "order_count": 1,
    "product_story": "Example",
    "product_type": "Example",
    "shopify_product_id": "sample_shopify_product_id",
    "sizechart_summary": "Example",
    "title": "Example",
    "variants": [
      {
        "availability_status": "in_stock",
        "available_for_sale": false,
        "image_url": "Example",
        "inventory_quantity": 1,
        "issue_count": 1,
        "order_count": 1,
        "shopify_variant_id": "sample_shopify_variant_id",
        "sku": "Example",
        "title": "Example"
      }
    ],
    "vendor": "Example"
  }
}
```

### List conversations for an organization

List conversations for an organization. Nonblank search also matches exact message words or phrases: at most 256 characters, 32 words and offset 10,000. REST OAuth searches share a separate organization API budget of 60 per minute; browser searches retain their organization budget of 120 per minute. Search throttling returns 429 with Retry-After; limiter or deadline failures return 503. Search performs no provider fetch and does not consume the delegated grant's vendor-operation budget. OAuth minimum role: viewer.

**Inputs**

- Status (`status`, text): Filter by conversation status
- Message activity (`message_activity`, text): Filter by message activity. One of: `not_empty` (Not empty), `customer_replied` (Customer replied), `scheduled`, `needs_reply` (Needs reply).
- Search (`search`, text): Search customer name, phone, product title, order name, or exact message words/phrases (case-insensitive, without stemming) within this organization
- Sort by (`sort_by`, text): Field to sort by. One of: `first_message` (First message), `last_customer_message` (Last customer message), `last_rs_message` (Last rs message).
- Sort dir (`sort_dir`, text): Sort direction. One of: `asc`, `desc`.
- Date from (`date_from`, date and time): Filter conversations created on/after this timestamp
- Date to (`date_to`, date and time): Filter conversations created on/before this timestamp
- Tag (`tag`, list): Repeatable conversation tag filter: 'key' matches conversations carrying the tag with any value, 'key:value' requires the exact value. All provided tag filters must match (AND).
- Limit (`limit`, number): Maximum results. From 1 to 100. Default: `50`.
- Offset (`offset`, number): Results to skip. At least 0. Default: `0`.

**Outputs**

- `data` (object): List of conversations.

**Example output**

```json
{
  "data": {
    "conversations": [
      {
        "checkin_scheduled_for": "2026-11-30T12:00:00Z",
        "conversation_id": "sample_conversation_id",
        "created_at": "2026-11-30T12:00:00Z",
        "current_channel": {
          "address": "Example",
          "channel_id": "sample_channel_id",
          "closed_at": "2026-11-30T12:00:00Z",
          "display_name": "Example",
          "endpoint_id": "sample_endpoint_id",
          "endpoint_status": "active",
          "is_current": false,
          "kind": "sms",
          "opened_at": "2026-11-30T12:00:00Z",
          "provider": "sample_provider",
          "replaced_by_channel_id": "sample_replaced_by_channel_id",
          "status": "active"
        },
        "customer_name": "Example",
        "customer_phone": "Example",
        "first_message_at": "2026-11-30T12:00:00Z",
        "follow_up_scheduled_for": "2026-11-30T12:00:00Z",
        "last_message_at": "2026-11-30T12:00:00Z",
        "last_message_preview": "Example",
        "ownership": {
          "claimed_at": "2026-11-30T12:00:00Z",
          "external_user_id": "sample_external_user_id",
          "owner_display_name": "Example",
          "owner_email": "Example",
          "owner_user_id": "sample_owner_user_id",
          "source": "signals",
          "updated_at": "2026-11-30T12:00:00Z",
          "version": 1
        },
        "status": "automated",
        "unread_count": 1
      }
    ],
    "pagination": {
      "has_more": false,
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}
```

### List customers for an organization

Return a page of organization customers, including order counts, linked conversation IDs and persisted summaries. Filters apply before pagination. The complete response requires customer, conversation and order read scopes. OAuth minimum role: viewer.

**Inputs**

- Search (`search`, text): Search by name, email, or phone
- Has conversation (`has_conversation`, true/false): Filter customers with or without a conversation
- Customer type (`customer_type`, text): Filter single-order vs repeat customers. One of: `single_order` (Single order), `repeat_customer` (Repeat customer).
- Created since days (`created_since_days`, number): Filter customers created within the last N days. At least 1.
- Sort by (`sort_by`, text): Sort field for customer list. One of: `created_at` (Created at), `name`, `order_count` (Order count). Default: `created_at`.
- Sort dir (`sort_dir`, text): Sort direction for customer list. One of: `asc`, `desc`. Default: `desc`.
- Limit (`limit`, number): Maximum results. From 1 to 100. Default: `50`.
- Offset (`offset`, number): Results to skip. At least 0. Default: `0`.

**Outputs**

- `data` (object): Paginated list of customers.

**Example output**

```json
{
  "data": {
    "customers": [
      {
        "conversation_id": "sample_conversation_id",
        "created_at": "2026-11-30T12:00:00Z",
        "customer_id": "sample_customer_id",
        "email": "Example",
        "first_name": "Example",
        "last_name": "Example",
        "latest_conversation_summary": "Example",
        "marketing_consent": {
          "sms_observed_at": "2026-11-30T12:00:00Z",
          "sms_source": "Example",
          "sms_status": "subscribed",
          "sources": [
            {}
          ]
        },
        "order_count": 1,
        "phone": "Example"
      }
    ],
    "pagination": {
      "has_more": false,
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}
```

### List customers who bought a product

List customers who bought a product. OAuth minimum role: viewer.

**Inputs**

- Product (`product_id`, text, required): Shopify product ID
- Limit (`limit`, number): Maximum results. From 1 to 100. Default: `50`.
- Offset (`offset`, number): Results to skip. At least 0. Default: `0`.

**Outputs**

- `data` (object): Paginated list of customers.

**Example output**

```json
{
  "data": {
    "customers": [
      {
        "conversation_id": "sample_conversation_id",
        "created_at": "2026-11-30T12:00:00Z",
        "customer_id": "sample_customer_id",
        "email": "Example",
        "first_name": "Example",
        "last_name": "Example",
        "latest_conversation_summary": "Example",
        "marketing_consent": {
          "sms_observed_at": "2026-11-30T12:00:00Z",
          "sms_source": "Example",
          "sms_status": "subscribed",
          "sources": [
            {}
          ]
        },
        "order_count": 1,
        "phone": "Example"
      }
    ],
    "pagination": {
      "has_more": false,
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}
```

### List orders containing a product

List orders containing a product. OAuth minimum role: viewer.

**Inputs**

- Product (`product_id`, text, required): Shopify product ID
- Limit (`limit`, number): Maximum results. From 1 to 100. Default: `50`.
- Offset (`offset`, number): Results to skip. At least 0. Default: `0`.

**Outputs**

- `data` (object): Offset-paginated mirrored orders with the reported count for the same filters.

**Example output**

```json
{
  "data": {
    "orders": [
      {
        "check_in_sent": false,
        "check_in_skip_reason": "contact_history_reset",
        "checkin_scheduled_for": "2026-11-30T12:00:00Z",
        "created_at": "2026-11-30T12:00:00Z",
        "customer_id": "sample_customer_id",
        "customer_name": "Example",
        "delivered_at": "2026-11-30T12:00:00Z",
        "issue_count": 1,
        "item_count": 1,
        "shopify_order_id": "sample_shopify_order_id",
        "shopify_order_name": "Example"
      }
    ],
    "pagination": {
      "has_more": false,
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}
```

### List orders for a customer

List orders for a customer. OAuth minimum role: viewer.

**Inputs**

- Customer (`customer_id`, text, required): Customer within the selected organization; cust_ followed by a ULID.
- Limit (`limit`, number): Maximum results. From 1 to 100. Default: `50`.
- Offset (`offset`, number): Results to skip. At least 0. Default: `0`.

**Outputs**

- `data` (object): Offset-paginated mirrored orders with the reported count for the same filters.

**Example output**

```json
{
  "data": {
    "orders": [
      {
        "check_in_sent": false,
        "check_in_skip_reason": "contact_history_reset",
        "checkin_scheduled_for": "2026-11-30T12:00:00Z",
        "created_at": "2026-11-30T12:00:00Z",
        "customer_id": "sample_customer_id",
        "customer_name": "Example",
        "delivered_at": "2026-11-30T12:00:00Z",
        "issue_count": 1,
        "item_count": 1,
        "shopify_order_id": "sample_shopify_order_id",
        "shopify_order_name": "Example"
      }
    ],
    "pagination": {
      "has_more": false,
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}
```

### List orders for an organization

List orders for an organization. OAuth minimum role: viewer.

**Inputs**

- Search (`search`, text): Search by order ID/name, customer, or product title
- Customer ID (`customer_id`, text): Filter by customer ID
- Product ID (`product_id`, text): Filter by product ID
- Has issues (`has_issues`, true/false): Filter orders with/without issues
- Checkin status (`checkin_status`, text): Filter by check-in state. One of: `pending`, `scheduled`, `sent`, `skipped`, `failed`.
- Delivery status (`delivery_status`, text): Filter by delivery state. One of: `delivered`, `undelivered`.
- Delivered since days (`delivered_since_days`, number): Filter delivered orders within the last N days. At least 1.
- Sort by (`sort_by`, text): Sort field for order list. One of: `delivered_at` (Delivered at), `created_at` (Created at), `issue_count` (Issue count), `item_count` (Item count). Default: `delivered_at`.
- Sort dir (`sort_dir`, text): Sort direction for order list. One of: `asc`, `desc`. Default: `desc`.
- Limit (`limit`, number): Maximum results. From 1 to 100. Default: `50`.
- Offset (`offset`, number): Results to skip. At least 0. Default: `0`.

**Outputs**

- `data` (object): Offset-paginated mirrored orders with the reported count for the same filters.

**Example output**

```json
{
  "data": {
    "orders": [
      {
        "check_in_sent": false,
        "check_in_skip_reason": "contact_history_reset",
        "checkin_scheduled_for": "2026-11-30T12:00:00Z",
        "created_at": "2026-11-30T12:00:00Z",
        "customer_id": "sample_customer_id",
        "customer_name": "Example",
        "delivered_at": "2026-11-30T12:00:00Z",
        "issue_count": 1,
        "item_count": 1,
        "shopify_order_id": "sample_shopify_order_id",
        "shopify_order_name": "Example"
      }
    ],
    "pagination": {
      "has_more": false,
      "limit": 1,
      "offset": 1,
      "total": 1
    }
  }
}
```

### List phone lines for an organization

List phone lines for an organization. OAuth minimum role: admin.

**Inputs**: None.

**Outputs**

- `data` (object): List of organization phone lines response.

**Example output**

```json
{
  "data": {
    "phone_lines": [
      {
        "available_for_inbound": false,
        "call_forwarding_number": "Example",
        "call_forwarding_supported": false,
        "carrier_managed_capacity": false,
        "contact_card_auto_share_enabled": false,
        "contact_card_supported": false,
        "conversations_today": 1,
        "created_at": "2026-11-30T12:00:00Z",
        "daily_net_new_engagement_cap": 1,
        "daily_net_new_engagement_cap_enabled": false,
        "friendly_name": "Example",
        "initial_outbound_disclosure_text": "Example",
        "is_active": false,
        "kind": "sms",
        "marketing_enabled": false,
        "phone_line_id": "sample_phone_line_id",
        "phone_number": "Example",
        "phone_number_type": "sms",
        "provider": "sample_provider",
        "provider_account_id": "sample_provider_account_id",
        "replaced_by_phone_line_id": "sample_replaced_by_phone_line_id",
        "sms_marketing_opt_in_required": false,
        "status": "active"
      }
    ],
    "total": 1
  }
}
```

### List products for an organization

List products for an organization. OAuth minimum role: viewer.

**Inputs**

- Search (`search`, text): Search Shopify fields and enabled CMS product content
- Vendor (`vendor`, text): Filter by product vendor
- Product type (`product_type`, text): Filter by product type
- Has issues (`has_issues`, true/false): Filter products with or without issues
- Sort by (`sort_by`, text): Sort field for product list. One of: `title`, `created_at` (Created at), `order_count` (Order count), `issue_count` (Issue count). Default: `title`.
- Sort dir (`sort_dir`, text): Sort direction for product list. One of: `asc`, `desc`. Default: `asc`.
- Limit (`limit`, number): Maximum results. From 1 to 100. Default: `50`.
- Offset (`offset`, number): Results to skip. At least 0. Default: `0`.

**Outputs**

- `data` (object): Paginated list of products.

**Example output**

```json
{
  "data": {
    "pagination": {
      "has_more": false,
      "limit": 1,
      "offset": 1,
      "total": 1
    },
    "products": [
      {
        "availability_status": "in_stock",
        "available_for_sale": false,
        "content_source": "shopify",
        "content_updated_at": "2026-11-30T12:00:00Z",
        "created_at": "2026-11-30T12:00:00Z",
        "image_url": "Example",
        "inventory_quantity": 1,
        "issue_count": 1,
        "order_count": 1,
        "product_type": "Example",
        "shopify_product_id": "sample_shopify_product_id",
        "title": "Example",
        "variants": [
          {}
        ],
        "vendor": "Example"
      }
    ]
  }
}
```

### Read catalog sync freshness and latest run status

Read catalog sync freshness and latest run status. OAuth minimum role: admin.

**Inputs**: None.

**Outputs**

- `data` (object): Shopify mirror health, current counts and successful-observation timestamps.

**Example output**

```json
{
  "data": {
    "last_successful_full_sync_at": "2026-11-30T12:00:00Z",
    "last_successful_incremental_sync_at": "2026-11-30T12:00:00Z",
    "last_successful_reconcile_sync_at": "2026-11-30T12:00:00Z",
    "last_successful_sync_at": "2026-11-30T12:00:00Z",
    "last_successful_sync_mode": "full",
    "latest_run": {
      "catalog_sync_run_id": "sample_catalog_sync_run_id",
      "created_at": "2026-11-30T12:00:00Z",
      "details": {},
      "error_summary": "Example",
      "mode": "full",
      "organization_id": "sample_organization_id",
      "products_seen": 1,
      "source": "shopify",
      "status": "queued",
      "updated_at": "2026-11-30T12:00:00Z",
      "variants_seen": 1
    },
    "mirrored_active_product_count": 1,
    "mirrored_available_variant_count": 1,
    "mirrored_product_count": 1,
    "mirrored_published_product_count": 1,
    "mirrored_variant_count": 1,
    "organization_id": "sample_organization_id",
    "sync_state": "not_started",
    "sync_state_summary": "Example"
  }
}
```

### Read return operations metrics

Return managed-return counts and stage timing for the reporting window. Approval latencies are minutes, postage is integer cents and rates are fractions from 0 to 1. OAuth minimum role: viewer.

**Inputs**

- Start date (`start_date`, date): Inclusive start date in the reporting timezone (defaults to a 30-day window)
- End date (`end_date`, date): Inclusive end date in the reporting timezone (defaults to today)
- Tz (`tz`, text): IANA timezone (e.g. America/New_York) used to resolve day windows and bucket daily analytics. Defaults to America/Los_Angeles.

**Outputs**

- `data` (object): Managed returns analytics payload.

**Example output**

```json
{
  "data": {
    "cases_completed": 1,
    "cases_created": 1,
    "delivered_to_warehouse_count": 1,
    "first_scan_rate": 1,
    "in_transit_count": 1,
    "invoice_collection_success_rate": 1,
    "label_purchase_success_rate": 1,
    "labels_purchased": 1,
    "median_approval_minutes": 1,
    "p95_approval_minutes": 1,
    "postage_spend_cents": 1,
    "resolution_mix": {
      "exchange": 1,
      "refund": 1
    },
    "window_end": "2026-11-30T12:00:00Z",
    "window_start": "2026-11-30T12:00:00Z"
  }
}
```

### Read the analytics overview

Return check-in volume, response rates, derived outcomes and recent conversation activity for an inclusive reporting-day window. Optional experiment filters use enrolled customers only. OAuth minimum role: viewer.

**Inputs**

- Status (`status`, text): Filter recent activity by conversation status. One of: `automated`, `escalated`, `blocked`.
- Message activity (`message_activity`, text): Filter recent activity by message activity. One of: `not_empty` (Not empty), `customer_replied` (Customer replied), `scheduled`, `needs_reply` (Needs reply).
- Experiment ID (`experiment_id`, text): Optional experiment ID to scope data to enrolled customers
- Start date (`start_date`, date): Inclusive start date in the reporting timezone (defaults to a 30-day window)
- End date (`end_date`, date): Inclusive end date in the reporting timezone (defaults to today)
- Tz (`tz`, text): IANA timezone (e.g. America/New_York) used to resolve day windows and bucket daily analytics. Defaults to America/Los_Angeles.

**Outputs**

- `data` (object): Response for GET /organizations/{org_id}/analytics/overview.

**Example output**

```json
{
  "data": {
    "experiment": {
      "experiment_id": "sample_experiment_id",
      "experiment_name": "Example",
      "started_at": "2026-11-30T12:00:00Z"
    },
    "metrics": {
      "avg_resolution_time_seconds": 1,
      "checkins_sent": 1,
      "median_resolution_time_seconds": 1,
      "operations": {
        "awaiting_human_response": 1,
        "escalation_rate": 1,
        "escalation_reasons": {},
        "needs_attention": 1,
        "open_conversations": 1
      },
      "outcomes": {
        "exchanged": 1,
        "kept": 1,
        "pending": 1,
        "returned": 1
      },
      "p95_resolution_time_seconds": 1,
      "response_rate": 1,
      "scheduled_checkins": 1,
      "scheduled_followups": 1
    },
    "period_end": "2026-11-30T12:00:00Z",
    "period_start": "2026-11-30T12:00:00Z",
    "recent_activity": [
      {
        "conversation_id": "sample_conversation_id",
        "created_at": "2026-11-30T12:00:00Z",
        "customer_email": "Example",
        "customer_name": "Example",
        "customer_phone": "Example",
        "last_message_at": "2026-11-30T12:00:00Z",
        "outcome_type": "kept",
        "status": "automated"
      }
    ]
  }
}
```

### Read the inferred catalog store profile used by catalog browsing

Read the inferred catalog store profile used by catalog browsing. OAuth minimum role: admin.

**Inputs**: None.

**Outputs**

- `data` (object): Stored profile-bootstrap state and inferred catalog structure for one organization.

**Example output**

```json
{
  "data": {
    "bootstrap_confidence": 1,
    "bootstrap_model_name": "Example",
    "bootstrap_status": "not_started",
    "bootstrap_summary": "Example",
    "catalog_store_profile_id": "sample_catalog_store_profile_id",
    "created_at": "2026-11-30T12:00:00Z",
    "error_summary": "Example",
    "last_bootstrapped_at": "2026-11-30T12:00:00Z",
    "live_product_sample_count": 1,
    "organization_id": "sample_organization_id",
    "profile": {
      "care_metafields": [
        {
          "key": "Example",
          "namespace": "Example"
        }
      ],
      "catalog_vertical": "unknown",
      "color_model": "unknown",
      "confidence": 1,
      "family_tag_prefixes": [
        "Example"
      ],
      "grounding_guidance": [
        "sample_grounding_guidance"
      ],
      "merchandise_domain": "Example",
      "noisy_tag_prefixes": [
        "Example"
      ],
      "policy_tags": [
        "Example"
      ],
      "primary_variant_axes": [
        "Example"
      ],
      "reasoning_summary": "Example",
      "search_rewrite_rules": [
        {
          "guidance": "sample_guidance",
          "search_phrases": [
            "Example"
          ],
          "when_terms": [
            "Example"
          ]
        }
      ],
      "size_option_names": [
        "Example"
      ],
      "sizechart_metafields": [
        {
          "key": "Example",
          "namespace": "Example"
        }
      ],
      "story_metafields": [
        {
          "key": "Example",
          "namespace": "Example"
        }
      ],
      "title_color_suffix_markers": [
        "Example"
      ],
      "weak_collection_prefixes": [
        "Example"
      ]
    },
    "runtime_enabled": false,
    "sampled_product_count": 1,
    "updated_at": "2026-11-30T12:00:00Z"
  }
}
```

### Read the order check-in funnel

Return uncancelled-order counts by check-in lifecycle, customer response and terminal non-send reason for the reporting window. An experiment filter restricts the enrolled population. OAuth minimum role: viewer.

**Inputs**

- Experiment ID (`experiment_id`, text): Optional experiment filter
- Start date (`start_date`, date): Inclusive start date in the reporting timezone (defaults to a 30-day window)
- End date (`end_date`, date): Inclusive end date in the reporting timezone (defaults to today)
- Tz (`tz`, text): IANA timezone (e.g. America/New_York) used to resolve day windows and bucket daily analytics. Defaults to America/Los_Angeles.

**Outputs**

- `data` (object): Order funnel response grouped by check-in and response behavior.

**Example output**

```json
{
  "data": {
    "awaiting_delivery": 1,
    "checkin_not_sent": 1,
    "checkin_scheduled": 1,
    "checkin_sent": 1,
    "customer_responded": 1,
    "no_response": 1,
    "period_end": "2026-11-30T12:00:00Z",
    "period_start": "2026-11-30T12:00:00Z",
    "skip_reasons": {},
    "total_orders": 1
  }
}
```

### Read the organization identity settings shown in dashboard settings

Read the organization identity settings shown in dashboard settings. OAuth minimum role: admin.

**Inputs**: None.

**Outputs**

- `data` (object): Agent identity the customer sees on first contact.

**Example output**

```json
{
  "data": {
    "identity_revision": "sample_identity_revision",
    "scheduled_persona_name": "Example",
    "scheduled_store_name": "Example"
  }
}
```
