Provides functionality to replicate Shopify order payloads with unique IDs for POS and direct webhook testing.
This skill allows you to replicate existing Shopify order JSON payloads (like those from POS systems) and generate fresh variations with unique id, legacyResourceId, number, and name. This is essential for testing systems that ingest Shopify webhooks (like Moqui/HotWax) without creating duplicate record errors.
This skill handles:
replicated_orders/ directory.Ensure you have a source JSON file containing one or more Shopify order payloads. POS scenarios are typically stored in the pos_scenarios/ directory.
Use the script via the terminal:
node scripts/replicate_orders.js --input <path_to_json> --count <number_of_replications>
Arguments:
--input or -i: Path to the source JSON file (required).--count or -n: Number of times to replicate the input (default: 1).--upload or -u: Optional flag to upload the generated file to the pre-configured MOQUI_URL.Check the console output for the generated filename. It will be saved under replicated_orders/[original_name]_[timestamp].json.
pos_scenarios/ as templates.MOQUI_URL and MOQUI_TOKEN constants inside scripts/replicate_orders.js.