Zenventory ACTION
Create Customer Order
Creates a new customer order. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Zenventory account once, then configure and run Create Customer Order 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: "zenventory-create-customer-order",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
zenventory: { authProvisionId: "apn_xxxxxxx" },
orderNumber: "Order Number",
clientId: 10,
},
})
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": "zenventory-create-customer-order",
"configured_props": {
"zenventory": { "authProvisionId": "apn_xxxxxxx" },
"orderNumber": "Order Number",
"clientId": 10
}
}'// 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": "zenventory",
},
},
},
)
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: "zenventory-create-customer-order",
arguments: {
orderNumber: "Order Number",
clientId: 10,
},
})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 |
|---|---|---|
orderNumber Order Number | string | Order number for the customer order. Optional |
clientId Client Id | integer | Id of the client that the customer order is for. Optional |
clientName Client Name | string | Name of the client that the customer order is for. Ignored if clientId is provided and is nonzero. Optional |
customerId Customer Id | integer | Id of the customer. If none is provided, will attempt to find an existing customer based on the other customer fields and shipping address. Other fields not used if id is provided. Optional |
title Customer Title | string | The title of the customer. Optional |
name Customer Name | string | A combination of name and surname is required if the customer is new. Optional |
surname Customer Surname | string | A combination of name and surname is required if the customer is new. Optional |
email Customer Email | string | The email of the customer. Optional |
customerCompany Customer Company | string | The company of the customer. Optional |
accountNumber Customer Account Number | string | Will only match a customer on this field if provided. Optional |
shippingAddressId Shipping Address Id | integer | Id of the shipping address. Other Shipping fields will not be used if provided. Optional |
shippingAddressCode Shipping Address Code | string | Used to find an existing address. Other fields not used if an address is successfully found. Optional |
shippingAddressCompany Shipping Address Company | string | The company of the shipping address. Optional |
shippingAddressName Shipping Address Name | string | The name of the shipping address. Optional |
shippingAddressline1 Shipping Address Line 1 | string | The shipping address line 1. Optional |
shippingAddressline2 Shipping Address Line 2 | string | The shipping address line 2. Optional |
shippingAddressline3 Shipping Address Line 3 | string | The shipping address line 3. Optional |
shippingAddressCity Shipping Address City | string | The city of the shipping address. Optional |
shippingAddressState Shipping Address State | string | The state of the shipping address. Optional |
shippingAddressZip Shipping Address Zip | string | The zip of the shipping address. Optional |
shippingAddressCountryCode Shipping Address Country Code | string | The country code of the shipping address. See the ISO 3166 codes. Optional |
shippingAddressPhone Shipping Address Phone | string | The phone of the shipping address. Optional |
sameAsShipping Same As Shipping | boolean | True if the billing address is the same as the shipping address. Optional |
shipFromWarehouseId Ship From Warehouse Id | string | Id of the warehouse the ordered items will be allocated from. If no warehouse parameters are given, then the user's current warehouse will be used. Optional |
shipFromWarehouseName Ship From Warehouse Name | string | Name of the warehouse the ordered items will be allocated from. Ignored if warehouseId is provided. Optional |
shipVia Ship Via | string | Code of the carrier or service to use for shipping. Optional |
postageAccount Postage Account | string | Who to bill for shipping. Optional |
items Items | string[] | An array of objects of ordered items. Example: {"itemId": "123", "sku": "SKU123", "quantity": 1} See the documentation fro further information. 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
- zenventory-create-customer-order
- Version
- 0.0.2
- App
- Zenventory
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗