1. Tasks
  2. Stub Cost

Tasks

Stub Cost

Adds up what a stub has been charged so far, in Stubbucks, millistubbucks and USD. Useful for showing a stub's cost, reporting on spend per process, or acting when a stub gets too expensive.

The cost is the sum of the stub's Stubbucks transactions up to the moment the task runs: the tasks and notifications that have run on it so far. You can also see a stub's cost on its Billing tab. See Stubbucks for how costs work.

Basic Usage

Task to get the cost of the current stub.

loading...

Parameters

stubref
required
string

The reference of the stub to get the cost of: 1970-01-01-XXXX-1234

Set it to an empty string, or to ~~stub.stubref, to get the cost of the current stub.

Notes

  • Only stubs in the stub's own org can be costed.
  • The task doesn't save anything to the stub. Use the result in a later task, eg with Save Data and ~~stubpost.tasks.retrieve_stub_cost.payload.cost.usd.

Result

loading...

Properties

cost.stubbucks

The total cost in Stubbucks: 12.5


cost.msb

The total cost in millistubbucks, 1000 to a Stubbuck: 12500


cost.usd

The total cost in US dollars, at ⛀ 1 = $0.10: 1.25