Skip to Content
FluxStore is currently invite-only. Some sections of this documentation are still being written and expanded.
OrdersGlobal Commands

Global Commands

Global commands run on every order, regardless of which package the customer bought. They’re separate from the delivery commands you set on a package, and they fire alongside them. Use them whenever the action you want to take is the same for every sale: announcing the purchase in chat, awarding loyalty currency on every order, logging the sale to an external system via a server-side bridge, or applying a network-wide cleanup on refund.

Think of them as a thin layer of “on every sale, do this” automation that you don’t want to copy-paste into the command list of every package you sell.

Creating a global command

Open Dashboard > Global Commands and click the New Global Command card to open the create form. Fill in the fields, then click Create Global Command.

A quick “announce every purchase in chat” example:

broadcast {player} just bought a package! Thanks for the support.

A loyalty-currency-on-every-sale example:

eco give {player} 100

A network-wide announcement when an order is refunded (set the command type to Refund):

say {player}'s last order has been refunded.

Commands are entered without a leading slash, exactly like package commands. They go out over the same WebSocket pipeline as package commands, so delivery, retries, and pending/awaiting-player handling all behave identically. See Command Delivery for the lifecycle details.

Configuration options

The create and edit forms expose these fields:

FieldWhat it does
CommandThe command line to run on the server. No leading slash. Use variables in curly braces (see below).
Command TypeWhich order event fires this command: Initial (on purchase), Renewal (on every successful subscription renewal), or Refund (when you refund the order).
Execution MethodExecute Directly sends the command as soon as the server is online. Execute When Player Online holds the command until the buyer logs in. Use the latter for anything that targets the player directly, like rank or inventory operations.
ActiveOnly active commands run. Toggle off to pause a command without deleting it.
Target ServersRun on All servers (default) or pick a specific subset. See Server targeting.

Global commands only support the Initial, Renewal, and Refund events. Unlike package commands, there is no Expiry or Chargeback type. If you need cleanup on expiry, put it on the package itself.

Variables

Global commands use the same order-context variables as package commands. They’re substituted at execution time:

VariableDescription
{player}Buyer’s Minecraft username
{username}Alias of {player}
{uuid}Buyer’s Minecraft UUID
{orderId}FluxStore order ID
{transactionId}Payment provider transaction ID
{amount}Order total
{currency}Payment currency code, e.g. USD
{email}Customer email
{discord}Linked Discord username, if connected
{ip}Customer IP at checkout

The command editor has an Insert macros panel under the input. Click any token to append it to your command.

Server targeting

By default, a global command runs on every server connected to your store. That’s almost always what you want: the whole point of a global command is “everywhere, every sale.”

Flip the All servers toggle off if you need to scope a command to a subset. The form will list each connected server with its own switch so you can pick exactly which ones receive the command. Useful when:

  • Your network has a hub plus several game servers, and a “purchase announcement” should only fire on the hub’s lobby chat.
  • One server in your network doesn’t have the plugin you’re calling (e.g. only your survival server runs Vault, so the eco give command should skip the minigames box).

If the buyer’s package is configured for a specific server, that doesn’t change which servers the global command runs on. Global targeting is independent of package targeting.

When NOT to use global commands

Global commands fire on every order. That’s powerful and easy to abuse. A few traps to avoid:

  • Don’t put item or perk grants here. If you put give {player} diamond 64 in a global command, every customer gets 64 diamonds no matter what they bought, including the $1 cosmetic. Item grants belong on the package.
  • Don’t put rank changes here. A global lp user {player} parent set vip would promote every customer to VIP whether they bought VIP or not. Same reasoning.
  • Don’t put expensive or destructive commands here. A stop or whitelist remove global command would fire on every order. Test with low-impact commands first.
  • Watch out for duplicate effects. If your loyalty plugin already grants currency through a package command, adding a global “give 100 coins” command means the customer gets both.

A good rule of thumb: if the action you want depends on what the customer bought, it goes on the package. If it applies the same way to any purchase, it’s a global command.

Test new global commands on a low-value test package first, or temporarily restrict them to a staging server with the Target Servers picker. A bad global command affects every future sale until you disable it.

Editing and disabling

Click any command on the Global Commands list to open its edit page; changes save immediately. Toggle Active off to pause a command without losing its configuration, or use the trash icon on the list view to delete it.

Next Steps