1. Stubs
  2. Stub Data Structure

Stubs

Stub Data Structure

The data structure of a stub in Stubber.

Overview

The data structure of a stub is a JSON object that contains all the information about the stub.
It's important to know the structure of the data so you can access and manipulate it in your templates.

Stub Data Structure

Here is an example of the stub data structure :

        {
  "orguuid": "[orguuid]",
  "stubref": "[stubref]",
  "stubuuid": "[stubuuid]",
  "state": "[state]",
  "subject": "[subject]",
  "contact_lists": {},
  "pointers": {
    "assigned_to": {
      "list_name": "_created_by"
    },
    "in_the_pool_of": {
      "list_name": "_org"
    }
  },
  "program": {
    "templateuuid": "[templateuuid]",
    "branch": "[branch]",
    "context": "[context]"
  },
  "data": {},
  "stubbucks": {
    "transaction_history": []
  },
  "links": [],
  "attachments": [],
  "metrics": {
    "counters": {}
  }
}

      

The main parts of the stub data structure are:

  • orguuid: The organization UUID that the stub belongs to.
  • stubref: The reference number of the stub.
  • stubuuid: The UUID of the stub.
  • state: The state of the stub.
  • subject: The subject of the stub.
  • contact_lists: The contact lists specific to this individual stub.
  • pointers: The pointers which keep the accountability and responsibility of the stub.
  • program: The program details of the stub.
  • data: The data that is used collected over the lifecycle of the stub. Usually from fields in the template.
  • stubbucks: The stubbucks transaction history.
  • links: The links associated with the stub.
  • attachments: The attachments associated with the stub (files and images).
  • metrics: The metrics collected over the lifecycle of the stub.

Referencing Stub Data

You can reference the stub data in your templates using the stub object.

For example, to access the stubuuid of the stub, you can use stub.stubuuid.