Getting Started
Welcome to HandledScript, the Commerce Automation Nodes Scripting Language designed specifically for e-commerce workflow automation.
What is HandledScript?
HandledScript is a powerful scripting language that enables developers to create sophisticated automation workflows for e-commerce operations. With its node-based architecture, you can easily connect different services, transform data, and automate complex business processes.
Key Features
- E-commerce Focused: Built specifically for commerce automation workflows
- Node-Based Architecture: Connect services using a visual node approach
- Rich Integrations: Pre-built connectors for Shopify, Deposco, EasyPost, and more
- Data Transformation: Powerful tools for processing and transforming e-commerce data
- Event-Driven: Trigger workflows based on e-commerce events and webhooks
What you'll need
- Node.js version 18.0 or above
- Basic understanding of JavaScript/TypeScript
- Access to e-commerce platforms you want to integrate
Your First HandledScript Workflow
Let's create a simple workflow that connects to a Shopify store and processes new orders:
// Define a new workflow
workflow OrderProcessor {
// Listen for new order events from Shopify
trigger shopify.newOrder {
store: "my-store.myshopify.com"
webhook_endpoint: "/webhooks/orders/new"
}
// Process the order data
transform orderData {
input: trigger.orderData
output: {
orderId: input.id,
customerEmail: input.customer.email,
totalAmount: input.total_price,
items: input.line_items.map(item => ({
productId: item.product_id,
quantity: item.quantity,
price: item.price
}))
}
}
// Send data to fulfillment service
action deposco.createOrder {
input: transform.orderData
endpoint: "https://api.deposco.com/orders"
}
}
Next Steps
- Learn about Client-Facing Scripts
- Explore Workflow Gates
- Build your first automation workflow
Ready to automate your e-commerce operations? Let's dive in!