Schedule MacroRIS-SM-2027 – Order Sync Macro for Automated POS Sales Integration

Order Sync Macro for Automated POS Sales Integration

Import completed sales from external POS systems and automatically create orders with customer, item, and payment details in the system.

Overview

The Order Sync macro retrieves completed sales data from external POS systems and creates corresponding orders.

It processes sales, maps payment methods, and generates orders with customer, item, and payment information.

Ensure API access and authentication for the external system are correctly configured before running this macro.

Purpose

This macro

  • Retrieves completed sales from external systems
  • Creates orders automatically
  • Maps payment methods to system accounts
  • Syncs customer and item data

In short
Sync external sales into the system as orders

When It Runs

Used for order synchronization

Typically runs

  • Scheduled execution recommended
  • Manually triggered when needed
  • After sales are completed in external systems

Parameters

path
sinceDatestring
Required

Date from which sales should be fetched

path
registersstring
Required

List of register names to filter sales

path
locationNamestring

Location where orders will be assigned

The macro processes completed sales and avoids duplicate order creation using external references.

How It Works

Fetch Sales Data

Retrieve completed sales from external system using API.

Handle Pagination

Load all pages of sales data if multiple pages exist.

Get Existing Orders

Retrieve existing order references to avoid duplicates.

Map Payment Methods

Match external payment types with system payment accounts.

Filter Valid Sales

Process only sales from selected registers.

Create Orders

Generate new orders with customer and item details.

Add Order Items

Add products to orders with correct quantity and pricing.

Set Totals and Payments

Apply totals and assign payment methods.

Add Notes

Attach notes from external sales if available.

Complete Process

Finalize order creation and log execution.

Final Result

  • Sales are imported as orders

  • Customer and item data is created

  • Payment methods are mapped correctly

  • Duplicate orders are avoided

  • Process execution is logged

Usefulness

This macro is highly beneficial for

  • Automating order creation from external systems
  • Reducing manual data entry
  • Improving data accuracy
  • Syncing sales and orders in real time
  • Enhancing operational efficiency

Important Notes

  • Requires valid API authentication

  • Processes only completed sales

  • Avoids duplicates using external reference

  • Payment mapping must be configured correctly

  • Depends on external system availability

  • Large data volumes may impact performance

Example Scenario

Key Insight

Automating order synchronization ensures consistency between systems and eliminates manual processing delays.