Macro Buttons

Created by Migration Bot, Modified on Wed, 21 Oct at 1:05 PM by Migration Bot

Originally written by Bryce Jackson, last updated Apr 02, 2026, on the Swan Retail knowledge base (SRS).


Overview

A macro button executes a series of predefined actions when pressed. For example, it might perform a transaction discount when pressed or open a website url.

Macro buttons can be used to:

  • Speeds up transactions by reducing the need for manual input.

  • Minimise training time for staff as common actions are simplified.

  • Reduces errors, as complex processes are automated.


Macro codes can be programmed in using the Cygnus Layout Builder in SRS or the Cygnus Server web app.

Add a button and set its function to “Macro”. At the bottom of the Appearance panel, there is a macro code text field, which should contain one of the below codes to determine the behaviour.

Note that each part of the code is separated by two underscore _ characters.

Discounts

Transaction Discount

Applies a transaction discount of value to the transaction.

TD__value__reasoncode

Where value is either an amount such as 5.00, or a percentage such as 10% (note the % symbol). reasoncodeis a valid reason code of a Reason held in SRS, such as MARKDOWN.

Example: TD__5.00__MARKDOWN

Line Discount

Applies a line discount of value to the currently selected line.

LD__value__reasoncode

Where value is either an amount such as 5.00, or a percentage such as 10% (note the % symbol). reasoncodeis a valid reason code of a Reason held in SRS, such as MARKDOWN.

Example: LD__10%__MARKDOWN

Cost Price Discount

Allow an item to be discounted down to its cost price. Can be achieved via a line or transaction discount.

LD__cost-price__reasoncode__supervisor

TD__cost-price__reasoncode__supervisor

Where LD and TD refers to Line Discount and Transaction Discount respectively. cost-price is a fixed parameter to set the item value down to the item cost price value. reasoncodeis a valid reason code of a Reason held in SRS, such as MARKDOWN. supervisor is an optional parameter and if exists will require a supervisor to authorise the discount.

Examples:

LD__cost-price__MARKDOWN__supervisor

TD__cost-price__MARKDOWN__supervisor

Note: Uses the last cost price field set against the item. Will not discount down to zero if an item's cost price is zero. Doesn't check an operator's discount max level when applying this discount.

Launch Webpage

Launches the specified webpage in a built-in browser. The most likely use would be for Store Operations by launching Swan Mobile.

LW__url

Where url is replaced with a valid URL.

Example: LW__https://www.swanretail.co.uk/

Customer Group

Adds a simple customer to the transaction in the specified customer group. This may be used to trigger a customer-specific promotion.

CG__customerGroup

Where customerGroup is replaced with a valid customer group code.

Example: CG__VIP

Receipt & Document Print (requires Cygnus v1.0-118.2)

Reprints can be triggered using a macro button. Requires the macro text to start as 'RT__' then the name of reprint function:

RT__STANDARD

RT__DELIVERYNOTE

RT__TILLINVOICE

RT__VAT

RT__GIFT

RT__EFTMERCHANT

RT__EFTCUSTOMER

RT__HTACUSTOMER

RT__HTAMERCHANT

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article