# Update Customer — Teamwork Desk

> Update a specific customer See the documentation

- Key: `teamwork_desk-update-customer`
- Type: Action (Write)
- Version: 0.0.3
- App: Teamwork Desk (`teamwork_desk`) — https://pipedream.com/apps/teamwork-desk.md
- This page (HTML): https://pipedream.com/apps/teamwork-desk/actions/update-customer
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/teamwork_desk/actions/update-customer/update-customer.mjs

## Description

Update a specific customer [See the documentation](https://apidocs.teamwork.com/docs/desk/3442f2a79b0d2-update-a-customer)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `customerId` | `string` | Yes | The customer id. Options are loaded from the connected account. |
| `address` | `string` | No | Customer address. |
| `avatarURL` | `string` | No | Customer avatar URL. |
| `companyId` | `string` | No | The company that the customer belongs to. Options are loaded from the connected account. |
| `email` | `string` | Yes | The email address of the customer. Email ticket replies and chat transcriptions will be sent to the customer at this address. |
| `externalId` | `string` | No | Customer external ID. |
| `extraData` | `string` | No | Provides a free-form reference field for additional customer information. |
| `facebookURL` | `string` | No | The Facebook URL address of the customer. |
| `firstName` | `string` | No | The first name of the customer. |
| `jobTitle` | `string` | No | Customer job title. |
| `lastName` | `string` | No | The last name of the customer. |
| `linkedinURL` | `string` | No | The Linkedin URL address of the customer. |
| `mobile` | `string` | No | The customer mobile. |
| `notes` | `string` | No | Provides a free-form reference field for additional customer information. |
| `organization` | `string` | No | Organization is the name of the organization that the Customer is in. This feature has been deprecated in favor of companies. |
| `permission` | `string` | No | Overrides the company ticket permission settings. Is only valid for customers that belongs to a company. |
| `phone` | `string` | No | Customer phone. |
| `twitterHandle` | `string` | No | The Twitter Handle of the customer. |

## 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": "teamwork_desk",
      },
    },
  },
)

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: "teamwork_desk-update-customer",
  arguments: {
    customerId: "Customer",
    address: "Address",
  },
})
```

**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: "teamwork_desk-update-customer",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    teamwork_desk: { authProvisionId: "apn_xxxxxxx" },
    customerId: "Customer",
    address: "Address",
  },
})

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": "teamwork_desk-update-customer",
    "configured_props": {
      "teamwork_desk": { "authProvisionId": "apn_xxxxxxx" },
      "customerId": "Customer",
      "address": "Address"
    }
  }'
```

---

- App: https://pipedream.com/apps/teamwork-desk.md · All apps: https://pipedream.com/apps
