Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

1.1 KB
Raw Blame
import { createAction } from '@activepieces/pieces-framework';
import { wooAuth } from '../../auth';
import { createOrderOutputSchema } from '../../output-schemas';
import { wooCreateOrder } from '../create-order';

export const wooAiCreateOrder = createAction({
  name: 'create_order',
  classification: 'WRITE',
  displayName: 'Create Order',
  description: 'Create an order with one or more line items.',
  audience: 'ai',
  aiMetadata: {
    description:
      'Creates a new order from product ids and quantities, optionally for a customer, with a status, and with a payment gateway; get product ids from list_products (a variation id can be used as the product id), customer ids from list_customers, and payment gateways from list_payment_gateways, passing the gateway id as Payment Method ID and its title as Payment Method Title. Status processing or completed reduces stock and emails the customer, while pending (the default) does neither. Each call creates a separate order.',
    idempotent: false,
  },
  auth: wooAuth,
  outputSchema: createOrderOutputSchema,
  props: wooCreateOrder.props,
  run: wooCreateOrder.run,
});