AmeriCommerce ACTION
Create Or Update Order
Creates a new order or updates an existing one. See the documentation here and here.
- Action
- Writes data
- Destructive
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's AmeriCommerce account once, then configure and run Create Or Update 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: "americommerce-create-update-order",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
americommerce: { authProvisionId: "apn_xxxxxxx" },
orderId: "Order ID",
customerId: "Customer 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": "americommerce-create-update-order",
"configured_props": {
"americommerce": { "authProvisionId": "apn_xxxxxxx" },
"orderId": "Order ID",
"customerId": "Customer 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": "americommerce",
},
},
},
)
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: "americommerce-create-update-order",
arguments: {
orderId: "Order ID",
customerId: "Customer 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 |
|---|---|---|
orderId Order ID | string | The unique identifier for the order. Required for updating or changing the status of an order. Optional Dynamic |
customerId Customer ID | string | The unique identifier for the customer. This ID is optional. Optional Dynamic |
orderStatusId Order Status ID | string | The ID of the order status. Optional Dynamic |
orderShippingAddressId Order Shipping Address ID | string | The ID of the order's shipping address. Optional Dynamic |
orderBillingAddressId Order Billing Address ID | string | The ID of the order's billing address. Optional Dynamic |
customerTypeId Customer Type ID | string | The customer type ID for the customer. Optional Dynamic |
specialInstructions Special Instructions | string | Special instructions for the order. Optional |
subtotal Subtotal | string | The subtotal of the order. Optional |
taxTotal Tax Total | string | The total tax for the order or tax added to the order. Optional |
shippingTotal Shipping Total | string | The total shipping cost for the order or shipping added to the order. Optional |
discountTotal Discount Total | string | The total discount for the order. Optional |
grandTotal Grand Total | string | The grand total of the order. Optional |
costTotal Cost Total | string | The total cost of the order. Optional |
selectedShippingMethod Selected Shipping Method | string | The selected shipping method for the order. Optional Dynamic |
referrer Referrer | string | The referrer for the order. Optional |
adminComments Admin Comments | string | Comments from the admin about the order. Optional |
source Source | string | The source of the order. Optional |
searchPhrase Search Phrase | string | The search phrase for the order. Optional |
storeId Store ID | string | The ID of the store. Optional Dynamic |
isPpc Is PPC | boolean | Whether the order is a PPC order. Optional |
ppcKeyword PPC Keyword | string | The PPC keyword for the order. Optional |
handlingTotal Handling Total | string | The handling total for the order. Optional |
isPaymentOrderOnly Is Payment Order Only | boolean | Whether the order is a payment order only. Optional |
selectedShippingProviderService Selected Shipping Provider Service | string | The selected shipping provider service for the order. Optional |
additionalFees Additional Fees | string | Additional fees for the order. Optional |
adcodeId Adcode ID | string | The adcode ID for the customer. Optional Dynamic |
isGift Is Gift | boolean | Whether the order is a gift. Optional |
giftMessage Gift Message | string | The gift message for the order. Optional |
publicComments Public Comments | string | Public comments about the order. Optional |
instructions Instructions | string | Instructions for the order. Optional |
sourceGroup Source Group | string | The source group for the order. Optional |
fromSubscriptionId From Subscription ID | string | The ID of the subscription. Optional Dynamic |
discountedShippingTotal Discounted Shipping Total | string | The discounted shipping total for the order. Optional |
orderNumber Order Number | string | The order number. Optional |
couponCode Coupon Code | string | The coupon code for the order. Optional |
orderType Order Type | string | The type of order. Optional |
expires Expires | boolean | Whether the order expires. Optional |
campaignCode Campaign Code | string | The campaign code for the order. Optional |
rewardPointsCredited Reward Points Credited | boolean | Whether the reward points are credited. Optional |
channel Channel | string | The channel for the order. Optional |
device Device | string | The device for the order. Optional |
dueDate Due Date | string | The due date for the order. Eg. 2021-05-14 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
- americommerce-create-update-order
- Version
- 0.0.2
- App
- AmeriCommerce
- Authentication
- API key
- Read-only
- No
- Destructive
- Yes
- Open world
- Yes
- Source
- View on GitHub ↗