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

# Enigma: Brand Revenue Search

> Sizing a private business or multi-location group by card-spend revenue per location when no public financials exist. Enigma Brand Revenue Search reference.

Sizing a private business or multi-location group by card-spend revenue per location when no public financials exist.

> [!NOTE]
>
> Tool ID: `enigma_brand_revenue_search`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'enigma_brand_revenue_search',
  {
    "name": "Example"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute enigma_brand_revenue_search --input '{
  "name": "Example"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "data": {
      "search": [
        {
          "id": "123e4567-e89b-42d3-a456-426614174000",
          "addresses": {},
          "cardTransactions": {}
        }
      ]
    },
    "errors": [
      {
        "message": "Example message",
        "path": [
          "example"
        ]
      }
    ]
  }
}
```

Use `deepline describe enigma_brand_revenue_search --json` for the latest machine-readable contract.

## Input reference

Resolves a brand or business name to its operating locations and returns 12-month projected card revenue, average ticket, transaction count, and year-over-year growth per location. Enigma matches brand names nationwide, so callers filtering to a single operator must gate results on the returned address state. The `state` property in this schema is applied by the Deepline runtime as a post-response filter, not as an upstream search constraint: Enigma's `searchInput.address` behaves as a match hint rather than a filter and returns zero results when supplied alone.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.name` | `string` | Yes | — | Brand, DBA, or business name to resolve to operating locations. |
| `payload.state` | `string` | No | — | Optional two-letter US state code. Applied by Deepline as a post-response filter on the resolved location address, because Enigma matches brand names nationwide. Minimum length: 2. Maximum length: 2. |
| `payload.period` | `"1m" \| "3m" \| "12m"` | No | `"12m"` | Reporting window for the returned quantities. Allowed: `1m`, `3m`, `12m`. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Resolves a brand or business name to its operating locations and returns 12-month projected card revenue, average ticket, transaction count, and year-over-year growth per location. Enigma matches brand names nationwide, so callers filtering to a single operator must gate results on the returned address state. The `state` property in this schema is applied by the Deepline runtime as a post-response filter, not as an upstream search constraint: Enigma's `searchInput.address` behaves as a match hint rather than a filter and returns zero results when supplied alone.",
    "properties": {
      "name": {
        "type": "string",
        "description": "Brand, DBA, or business name to resolve to operating locations."
      },
      "state": {
        "type": "string",
        "description": "Optional two-letter US state code. Applied by Deepline as a post-response filter on the resolved location address, because Enigma matches brand names nationwide.",
        "minLength": 2,
        "maxLength": 2
      },
      "period": {
        "type": "string",
        "description": "Reporting window for the returned quantities.",
        "default": "12m",
        "enum": [
          "1m",
          "3m",
          "12m"
        ]
      }
    },
    "required": [
      "name"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | GraphQL envelope. Enigma always returns a `data` wrapper. `search` is a list of union members narrowed to OperatingLocation by the pinned query. |
| `result.data.data` | `object` | No | — | — |
| `result.data.data.search` | `array` | No | — | — |
| `result.data.data.search[].id` | `string` | No | — | Enigma operating location identifier. Format: `uuid`. |
| `result.data.data.search[].addresses` | `object` | No | — | Relay-style connection. Deepline reads the first edge only. |
| `result.data.data.search[].addresses.edges` | `array` | No | — | — |
| `result.data.data.search[].addresses.edges[].node` | `object` | No | — | — |
| `result.data.data.search[].addresses.edges[].node.city` | `string \| null` | No | — | — |
| `result.data.data.search[].addresses.edges[].node.state` | `string \| null` | No | — | — |
| `result.data.data.search[].cardTransactions` | `object` | No | — | Relay-style connection of card-spend metrics. One edge per quantityType x period combination. |
| `result.data.data.search[].cardTransactions.edges` | `array` | No | — | — |
| `result.data.data.search[].cardTransactions.edges[].node` | `object` | No | — | One card-spend metric for one period. Enigma returns every quantityType/period pair as a separate node. Deepline selects the requested period and normalizes the set into scalar fields. |
| `result.data.data.search[].cardTransactions.edges[].node.quantityType` | `"card_revenue_amount" \| "avg_transaction_size" \| "card_transactions_count" \| "card_revenue_yoy_growth" \| "card_revenue_prior_period_growth" \| "card_customers_average_daily_count" \| "refunds_amount" \| "has_transactions"` | No | — | Metric name. Verified live 2026-08-11. Allowed: `card_revenue_amount`, `avg_transaction_size`, `card_transactions_count`, `card_revenue_yoy_growth`, `card_revenue_prior_period_growth`, `card_customers_average_daily_count`, `refunds_amount`, `has_transactions`. |
| `result.data.data.search[].cardTransactions.edges[].node.period` | `"1m" \| "3m" \| "12m"` | No | — | Allowed: `1m`, `3m`, `12m`. |
| `result.data.data.search[].cardTransactions.edges[].node.projectedQuantity` | `number \| null` | No | — | Projected value for the quantity over the period. Growth types are expressed as a ratio, not a percentage: 0.0721 means +7.21%. Format: `double`. |
| `result.data.data.search[].cardTransactions.edges[].node.periodStartDate` | `string \| null` | No | — | Format: `date`. |
| `result.data.data.search[].cardTransactions.edges[].node.periodEndDate` | `string \| null` | No | — | Format: `date`. |
| `result.data.errors` | `array` | No | — | — |
| `result.data.errors[].message` | `string` | No | — | — |
| `result.data.errors[].path` | `array` | No | — | — |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "GraphQL envelope. Enigma always returns a `data` wrapper; `search` is a list of union members narrowed to OperatingLocation by the pinned query.",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "search": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Enigma operating location identifier.",
                      "format": "uuid"
                    },
                    "addresses": {
                      "type": "object",
                      "description": "Relay-style connection. Deepline reads the first edge only.",
                      "properties": {
                        "edges": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "node": {
                                "type": "object",
                                "properties": {
                                  "city": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "state": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    },
                    "cardTransactions": {
                      "type": "object",
                      "description": "Relay-style connection of card-spend metrics. One edge per quantityType x period combination.",
                      "properties": {
                        "edges": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "node": {
                                "type": "object",
                                "description": "One card-spend metric for one period. Enigma returns every quantityType/period pair as a separate node; Deepline selects the requested period and normalizes the set into scalar fields.",
                                "properties": {
                                  "quantityType": {
                                    "type": "string",
                                    "description": "Metric name. Verified live 2026-08-11.",
                                    "enum": [
                                      "card_revenue_amount",
                                      "avg_transaction_size",
                                      "card_transactions_count",
                                      "card_revenue_yoy_growth",
                                      "card_revenue_prior_period_growth",
                                      "card_customers_average_daily_count",
                                      "refunds_amount",
                                      "has_transactions"
                                    ]
                                  },
                                  "period": {
                                    "type": "string",
                                    "enum": [
                                      "1m",
                                      "3m",
                                      "12m"
                                    ]
                                  },
                                  "projectedQuantity": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "description": "Projected value for the quantity over the period. Growth types are expressed as a ratio, not a percentage: 0.0721 means +7.21%.",
                                    "format": "double"
                                  },
                                  "periodStartDate": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "date"
                                  },
                                  "periodEndDate": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "format": "date"
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false
                          }
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                },
                "path": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0.7` per pricing unit.

## Related documentation

* [Enigma provider guide](https://deepline.com/docs/providers/enigma/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.