# \[New 4.1.42\] Execute Automation Command Action

**URL:** <https://forum.sambapos.com/t/new-4-1-42-execute-automation-command-action/1866>\
**Category:** General\
**Created:** [July 23, 2014, 11:07pm UTC](https://forum.sambapos.com/t/new-4-1-42-execute-automation-command-action/1866 "2014-07-23T23:07:13Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![QMcKay](https://forum.sambapos.com/user_avatar/forum.sambapos.com/qmckay/32/27925_2.png) [@QMcKay](https://forum.sambapos.com/u/QMcKay)\
**Post date:** [July 24, 2014, 1:13am UTC](https://forum.sambapos.com/t/new-4-1-42-execute-automation-command-action/1866/8 "2014-07-24T01:13:12Z")

</div>

@gerlandog, here is an example of using constraints on Actions within a Rule, taken from Gift Certificate Tutorial. The Rule is called **GC Redeemed (used as Payment) - Update GC Data**.

> [@Gift Certificate Sales & Redemption](http://forum.sambapos.com/t/gift-certificate-sales-redemption/1539):
>
> Gift Certificate Sales & Redemption This is a working implementation for Selling & Redeeming variable-value Gift Certificates (GCs) that are tracked under their own individual GC Account and 2 “GC Balance” Accounts called “GC Purchases” and “GC Redemptions”. GC Sale: Customer comes in to purchase a Gift Certificate (GC). Enter the value of the GC that the customer wants to purchase into the NUMBERPAD ($10, $20, etc). Select GC Product (open price). Settle the ticket - customer pays for the G…

In particular, the last 2 actions in this rule **GC Redeemed (used as Payment) - Update GC Data** have a constraint to determine whether to refresh the payment screen or close the ticket… only one of the actions will execute because of the constraints on the 2 actions:

Action: `Display Payment Screen`  
Constraint: `[:RemainingAmount]>0`

Action: `Close Ticket`  
Constraint: `[:RemainingAmount]<=0`

---

_[View the full topic](https://forum.sambapos.com/t/new-4-1-42-execute-automation-command-action/1866)._
