# Update Customer Information — DigitalRiver

> Updates the information for a customer in Digital River. See the documentation

- Key: `digitalriver-update-customer-information`
- Type: Action (Write)
- Version: 0.0.2
- App: DigitalRiver (`digitalriver`) — https://pipedream.com/apps/digitalriver.md
- This page (HTML): https://pipedream.com/apps/digitalriver/actions/update-customer-information
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/digitalriver/actions/update-customer-information/update-customer-information.mjs

## Description

Updates the information for a customer in Digital River. [See the documentation](https://www.digitalriver.com/docs/digital-river-api-reference/#tag/Customers/operation/updateCustomers)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `customerId` | `string` | Yes | The unique identifier for the customer Options are loaded from the connected account. |
| `email` | `string` | No | The customer email address. |
| `line1` | `string` | No | The first line of the address. |
| `line2` | `string` | No | The second line of the address. |
| `city` | `string` | No | The city of the address. |
| `postalCode` | `string` | No | The postal code of the address. |
| `state` | `string` | No | The state, county, province, or region. |
| `country` | `string` | No | A two-letter Alpha-2 country code as described in the ISO 3166 international standard. |
| `name` | `string` | No | The recipient's name. |
| `phone` | `string` | No | The recipient's phone number. |
| `shippingEmail` | `string` | No | The recipient's email address. |
| `organization` | `string` | No | The recipient's organization. |
| `neighborhood` | `string` | No | The neighborhood of the address. |
| `division` | `string` | No | A division within an organization. |
| `phoneticName` | `string` | No | The phonetic spelling of a name. |
| `companyName` | `string` | No | The name of the company that holds the certificate. |
| `taxAuthority` | `string` | No | The issuing state. |
| `startDate` | `string` | No | Tax certificate start date. |
| `endDate` | `string` | No | Tax certificate end date. |
| `fileId` | `string` | No | The identifier of the file that contains the tax certificate. Options are loaded from the connected account. |
| `requestToBeForgotten` | `boolean` | No | If true, indicates this customer has submitted a request to be forgotten. |
| `type` | `string` | No | The type of customer. |
| `metadata` | `object` | No | Key-value pairs used to store additional data. Value can be string, boolean or integer types. |
| `locale` | `string` | No | A locale designator that combines the two-letter ISO 639-1 language code with the ISO 3166-1 alpha-2 country code. |
| `enabled` | `boolean` | No | Usually used to disable the customer. The default is true. If false, attempts to create orders for the customer will fail. |

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

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: "digitalriver-update-customer-information",
  arguments: {
    customerId: "Customer ID",
    email: "Email",
  },
})
```

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

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": "digitalriver-update-customer-information",
    "configured_props": {
      "digitalriver": { "authProvisionId": "apn_xxxxxxx" },
      "customerId": "Customer ID",
      "email": "Email"
    }
  }'
```

---

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