ChartMogul ACTION
Create Customer
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's ChartMogul account once, then configure and run Create Customer from your backend or agent.
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: "chartmogul-create-customer",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
chartmogul: { authProvisionId: "apn_xxxxxxx" },
dataSourceId: "Data Source UUID",
externalId: "External ID",
},
})
console.log(result)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": "chartmogul-create-customer",
"configured_props": {
"chartmogul": { "authProvisionId": "apn_xxxxxxx" },
"dataSourceId": "Data Source UUID",
"externalId": "External ID"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{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": "chartmogul",
},
},
},
)
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: "chartmogul-create-customer",
arguments: {
dataSourceId: "Data Source UUID",
externalId: "External ID",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
dataSourceId Data Source UUID | string | The ChartMogul UUID of the data source that this customer comes from. Required Dynamic |
externalId External ID | string | A unique identifier specified by you for the customer. Typically an identifier from your internal system. Accepts alphanumeric characters. Required |
name Name | string | Name of the customer for display purposes. Accepts alphanumeric characters. Required |
email Email | string | Email address of the customer. Optional |
company Company | string | The customer's company or organisation. Optional |
country Country | string | Country code of customer's location as per ISO-3166 alpha-2 standard. Optional |
state State | string | State code of customer's location as per ISO-3166 alpha-2 standard. Optional |
city City | string | City of the customer's location. Optional |
zip Zip | string | Zip code of the customer's location. Optional |
leadCreatedAt Lead Created At | string | Time at which this customer was established as a lead. Must be an ISO 8601 formatted time in the past. The timezone defaults to UTC unless otherwise specified. Optional |
freeTrialStartedAt Free Trial Started At | string | Time at which this customer started a free trial of your product or service. Must be an ISO 8601 formatted time in the past. The timezone defaults to UTC unless otherwise specified. This is expected to be the same as, or after the lead_created_at value. Optional |
tags Tags | string[] | An Array of tags to be added to the customer. Optional |
custom Custom | string[] | An Array containing the custom attributes to be added to the customer. If sending custom attributes, each custom attribute must be an object and have a type, key, and value. E.g. {"type":"String","key": "key1","value": "value1"} Optional |
source Source | string | Optional parameter for UI use. Can be updated, doesn't show in response. Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- chartmogul-create-customer
- Version
- 0.0.2
- App
- ChartMogul
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗