# Get Customers — Business Edge

> Retrieve customers from Business Edge via POST /masterfiles/customerV3/export.json. See the documentation

- Key: `business_edge-get-customers`
- Type: Action (Read-only)
- Version: 0.0.3
- App: Business Edge (`business_edge`) — https://pipedream.com/apps/business-edge.md
- This page (HTML): https://pipedream.com/apps/business-edge/actions/get-customers
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/business_edge/actions/get-customers/get-customers.mjs

## Description

Retrieve customers from Business Edge via `POST /masterfiles/customerV3/export.json`. [See the documentation](https://hangerbolt.ci-inc.com/apilist/export)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `entity` | `string` | Yes | Entity for this request. Options load from customer V3 args.json when available; otherwise numeric codes 1–20 are shown (configurable fallback). Options are loaded from the connected account. |
| `dateFormatOpt` | `string` | No | A=mm-dd-yy; B=yy-mm-dd; C=yyyy-mm-dd; D=mmddyy; E=yymmdd; F=yyyymmdd; G=dd-mm-yy; H=ddmmyy |
| `dateDelim` | `string` | No | Optional delimiter used with formatted dates in the API request |
| `savedSchemaId` | `string` | No | Optional saved API schema ID for returned data (use with or instead of schema code) |
| `savedSchemaCode` | `string` | No | Optional saved API schema code for returned data (use with or instead of schema ID) |
| `availBom` | `boolean` | No | When true, include bill of materials in availability-related export output |
| `chooseOne` | `object` | No | Send Search, List, and/or Range per API rules (Range overrides search and list). Example: { "Search": "ACME" } or { "Range": { "CustBeg": "", "CustEnd": "", "CustSeq": "B" } } |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "business_edge",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "business_edge-get-customers",
  arguments: {
    entity: "Entity",
    dateFormatOpt: "Date Format (DateFormatOpt)",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "business_edge-get-customers",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    business_edge: { authProvisionId: "apn_xxxxxxx" },
    entity: "Entity",
    dateFormatOpt: "Date Format (DateFormatOpt)",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "business_edge-get-customers",
    "configured_props": {
      "business_edge": { "authProvisionId": "apn_xxxxxxx" },
      "entity": "Entity",
      "dateFormatOpt": "Date Format (DateFormatOpt)"
    }
  }'
```

---

- App: https://pipedream.com/apps/business-edge.md · All apps: https://pipedream.com/apps
