View as Markdown
Allocadence icon

Allocadence ACTION

Create Purchase Order

Generates a new purchase order. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Allocadence account once, then configure and run Create Purchase 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: "allocadence-create-purchase-order",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    allocadence: { authProvisionId: "apn_xxxxxxx" },
    supplierId: 10,
    supplierName: "Supplier Name",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Purchase Order inputs
Property Type Description
supplierId Supplier Id integer
Id of the supplier that is being ordered from.
Optional
supplierName Supplier Name string
Name of the supplier that is being ordered from. Ignored if supplierId is provided.
Optional
warehouseId Warehouse Id integer
Id of the warehouse the items will be delivered to. If no warehouse parameters are given, then the user's current warehouse will be used.
Optional
warehouseName Warehouse Name string
Name of the warehouse the items will be delivered to. Ignored if warehouseId is provided.
Optional
clientId Client Id integer
Id of the client that the purchase order is for. Defaults to the user's client id.
Optional
clientName Client Name string
Name of the client that the purchase order is for. Ignored if clientId is provided and is nonzero.
Optional
orderNumber Order Number string
Order number for the purchase order. If blank, one will automatically be generated.
Optional
draft Draft boolean
True if the purchase order should be created as a draft to allow future editing.
Optional
requiredByDate Required By. string
The date of the purchase. Format: YYYY-MM-DD
Optional
projectNumber Project Number string
The number of the project.
Optional
notes Notes string
A note of the purchase.
Optional
items Items string[]
A list of object of ordered items. Example: {"itemId": 123, "sku": "SKU123", "description": "description", "quantity": 1}. See the documentation for 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
allocadence-create-purchase-order
Version
0.0.3
App
Allocadence
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes