Use SmartApp Forwarding to set template for automatic forwarding of received amount to another Virtual account. Amount of forwarding transaction can be expressed as fixed of percentage amount of incoming transaction. You can add multiple forwarding transactions for each Virtual account.
Create forwarding
Forwarding is transaction post-process routing.
After transaction or deposit is processed all Apps.Forwards are triggered. If any condition is resolved TRUE array of transactions is executed.
Set value_type as FIXED or PERCENTAGE and add value value. This fixed or percentage amount of original transaction that is forwarded as transaction.value in new, forwarded transactions.
Condition Evaluation
The conditions are evaluated based on the attributes of the transaction. The conditions within an array act as logical OR operators, and the fields within the same condition object act as logical AND operators.
For the conditions array to be considered met, at least one condition within the array must be true. For a condition to be true, all specified fields within that condition object must match the corresponding fields in the transaction.
Additionally, it's important to note that min and max can be used together to specify a range, and if either min or max is alone, the transaction value is matched against that specific value.
Condition example
Explained:
IF
transaction arrived from account with id 656a0fd58e907523577a53f6, AND is of type paymentAND with transaction amount between 20 to 25 BTC
OR
transaction destination is alias ALIAS1 AND transaction amount exactly 0.002 BTC.
If condition is met for the transaction currently being processed, resulting transactions will be executed thus forwarding received amount to new destinations.
Forwarding transactions example
Explained:
Do 2 forwards.
1. send 10% of incoming transaction amount to account 65562b757789a763c76fed81
2. send 0.0001 BTC to alias alias2.
You can delete Apps.Forwrad and disable automatic routing for all new transcations. Transactions already processed will not be impacted by this change.
To delete Apps.Forward you need the ID of that entity.