Schedule MacroRIS-SM-2009 – Open Order CSV Labels

Open Order CSV Labels

Extract personalised order note data, convert it into CSV, and upload to FTP for label processing.

Overview

The RIS-SM-2009 – Open Order CSV Labels macro extracts personalised text data from order notes and converts it into a structured CSV file.

It uploads the generated file to an FTP server, enabling seamless label printing and external processing workflows.

Ensure order notes follow a consistent format so that regex-based extraction works accurately.

Purpose

This macro:

  • Reads personalised data from order notes

  • Filters items using SKU list

  • Generates structured CSV output

  • Uploads the file to FTP

👉 In short:
Convert order notes into CSV for label and customisation workflows.

When It Runs

Used for label export & personalisation processing

Typically runs:

  • Scheduled execution (daily or interval-based)

  • Manually triggered

Parameters

path
ftphoststring
Required

FTP server address.

path
ftpsslboolean
Required

Enable or disable SSL.

path
ftpfolderstring
Required

Destination FTP folder.

path
skulistwithcommastring
Required

Comma-separated list of SKUs to filter.

Example:
skulistwithcomma = "SKU1, SKU2, SKU3"

👉 Only matching SKUs will be exported.

How It Works

Retrieve Orders

Fetch open orders from the last 24 hours.

Skip Processed Orders

Ignore orders already tagged with “Order Checked for Export Ftp”.

Filter SKUs

Process only items matching the provided SKU list.

Extract Personalisation Data

Use regex to extract details like name, surname, font, and colour from notes.

Format Data

Prepare structured rows including Order ID, SKU, quantity, and text fields.

Generate CSV

Build CSV file with headers and formatted rows.

Create Filename

Format: ExportedOrders_DDMMYYHHMMSS.csv

Upload File

Upload CSV file to the configured FTP folder.

Mark Orders

Assign identifier “Order Checked for Export Ftp” to prevent duplication.

Final Result

  • CSV file generated with structured personalisation data

  • File uploaded to FTP server

  • Orders tagged to prevent reprocessing

  • Only selected SKUs included

Usefulness

This macro is highly beneficial for:

  • Automating personalised label data extraction

  • Eliminating manual note handling

  • Supporting customised product workflows

  • Preventing duplicate processing

  • Enabling integration with external label systems

Important Notes

  • Processes only orders from the last 24 hours

  • Includes only SKUs from the provided list

  • Requires consistent note format for regex extraction

  • No file generated if no valid data exists

  • FTP configuration must be correct

  • Orders are tagged only after successful processing

  • CSV structure is fixed (OrderId, SKU, Quantity, Text1)

Example Scenario

Key Insight

Transforming unstructured order notes into structured CSV data improves accuracy, reduces manual effort, and enables seamless integration with external fulfilment and labelling systems.