- Home
- Skills
- Leonardo Picciani
- Senior Erp Agent Skills
- Senior Erp Pedido Venda Criar
senior-erp-pedido-venda-criar_skill
0
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill leonardo-picciani/senior-erp-agent-skills --skill senior-erp-pedido-venda-criar- SKILL.md4.7 KB
Overview
This skill creates Sales Orders (Pedido de Venda) in the Senior ERP through the Senior X Platform. It focuses on safe, idempotent creation flows for orders coming from external channels such as e-commerce or marketplace. Use it when you need validation, confirmation and normalized results before writing into the ERP.
How this skill works
The skill validates input (client, items, delivery, payment), checks idempotency using an external_order_id, and queries Senior APIs to detect existing orders. It presents a compact confirmation summary, then calls the appropriate Senior endpoint to create or update the order with retry/backoff for transient errors. The result is normalized: Senior order number, external_order_id, status and any warnings or actionable errors.
When to use it
- Importing or synchronizing e-commerce/marketplace orders into Senior ERP
- Creating sales orders where deduplication by external_order_id is required
- Flows that require a human confirmation step before mutating ERP data
- Batch imports where you must report created vs already-existing orders
- Scenarios requiring validation of items, prices, shipping and payment data
Best practices
- Define and use external_order_id as the idempotency key for every incoming order
- Decide price precedence (channel price vs ERP price table) and apply consistently
- Validate required fields (client, item SKU, quantity > 0, payment terms) before API calls
- Query the ERP for existing orders first to avoid duplicates and support updates
- Show a concise summary (client, total, top items, delivery, payment) and get confirmation before create
- Implement retries with exponential backoff for 429 and 5xx responses and handle validation errors explicitly
Example use cases
- Real-time checkout integration: validate cart, confirm with operator, then create PV with external_order_id
- Bulk import of marketplace orders: deduplicate, create missing orders and report grouped errors
- Order enrichment flow: locate or create client in Senior, validate SKUs, then persist sales order
- Automated pipeline that flags stock warnings or price substitutions back to the channel
FAQ
Use external_order_id as the canonical idempotency key; first check the ERP for that key before creating.
What should I show in the confirmation step?
A compact summary: customer, order total, top N items, delivery method/cost and payment condition.
How are validation errors returned?
Return a normalized error structure with the failure reason and recommended action (fix data, retry, contact support).