Skip to content

Dispatch

Create and manage dispatch entries.

CreateDispatch

    core.CreateDispatch({...})

Create a new dispatch. Author is a required field even for Swimlane entries.

  • Object
    • author: String!
    • userId: String
    • when: Date
    • swimlaneId: String
    • trackerId: String
    • body: String
    • blocks: String
    • data: Table
    • taskState: String
    • startTime: DateTime
    • endTime: DateTime
    • serviceId: String
    • batchId: String
    • attachments: String[]
    • taskTracker: String
    • swimlaneHandle: String
    • trackerHandle: String
    • programStatus: String
    • programId: String
    • updateMessage: String
    • createdAt: String typically set by the system but allows override for imported data
    • keys: String[(String,String)] search keys
  • Number number of items in the table
    values = {
        someValue="foo", someOtherValue="bar"
    }
    core.CreateDispatch({
        author="..valid author id..",
        userId="..valid user id (if not author)..",
        trackerId="..valid tracker id..",
        data=values,
        when="2021-01-01",
        keys={{"key1", "test1"}, {"key2", "test2"}}
    })

The data value will be converted from a Lua table into a JSON object. A _type attribute can be provided to coerce values into a specific type.

Example

    values = {
        someValue="foo", 
        someOtherValue="bar",
        arr={ _type="array", "apple", "orange" }
    }

Result

    {
        "someValue":"foo",
        "someOtherValue":"bar",
        "arr":["apple", "orange"]
    }

CreateOrUpdateDispatch

    core.CreateOrUpdateDispatch({...})

Creates a dispatch as above but uses serviceId to find and update or create a new dispatch.

Find a dispatch by serviceId and update or create a new dispatch if not found. Author is a required field even for Swimlane entries.

  • Object
    • author: String!
    • userId: String
    • when: Date
    • swimlaneId: String
    • trackerId: String
    • body: String
    • blocks: String
    • data: Table
    • taskState: String
    • startTime: DateTime
    • endTime: DateTime
    • serviceId: String Required
    • batchId: String
    • attachments: String[]
    • taskTracker: String
    • swimlaneHandle: String
    • trackerHandle: String
    • programStatus: String
    • programId: String
    • updateMessage: String
  • Number number of items in the table
    values = {
        someValue="foo", someOtherValue="bar"
    }
    core.CreateOrUpdateDispatch({
        author="..valid author..",
        userId="..valid user id..",
        trackerId="..valid tracker id..",
        serviceId="..unique within the org..",
        data=values, 
    })

UpdateDispatchData

    core.UpdateDispatchData({dispatchId=...})

Finds an existing dispatch and updates the data attached, replacing the existing data.

  • Object
    • dispatchId: UUID!
    • trackerId: UUID!
    • data: Lua table
  • Boolean

UpdateDispatchTracker

    core.UpdateDispatchTracker({id=...})

Updates the tracker id for a dispatch. Provide either a tracker id or a tracker handle.

  • Object
    • id: UUID!
    • trackerId: UUID
    • trackerHandle: String
  • Boolean

AddAction

    core.AddAction({dispatchId=...})    

Add a social action or participant to a dispatch.

  • Object
    • dispatchId: String! dispatch id
    • userId: UUID! user for the action
    • action: Enumeration! answer, participant, leader, organizer, like, bookmark, confirm, process
    • payload: String action specific payload
  • Boolean

ApplyDispatchKeys

    core.ApplyDispatchKeys("97e7d38a-1005-4788-adc2-7c57b5228c28", {
        {name="testKey1", value="bar"},
        {name="testKey2", value="foo"}    
    });

Add query keys to existing dispatches

  • Dispatch id
  • List
    • name: String! name of key
    • value: String! value for key
  • Boolean

ApplyDispatchKeys

    core.ApplyDispatchKeys("97e7d38a-1005-4788-adc2-7c57b5228c28", {
        {name="testKey1", value="bar"},
        {name="testKey2", value="foo"}    
    })

Add query keys to existing dispatches

  • Dispatch id
  • List
    • name: String! name of key
    • value: String! value for key
  • Boolean

DeleteDispatch

    core.DeleteDispatch("97e7d38a-1005-4788-adc2-7c57b5228c28")

Delete the identified dispatch

  • Dispatch id
  • Boolean

Buckets

AddUserBucketDispatch

    core.AddUserBucketDispatch({ownerId="..", dispatchId="..", handle=".."})

Add a dispatch to a user bucket identified by handle.

  • ownerId: user owner of the bucket
  • dispatchId: dispatch to add
  • handle: handle of the bucket
  • Boolean

RemoveUserBucketDispatch

    core.RemoveUserBucketDispatch({ownerId="..", dispatchId=".."})

Remove a dispatch from a user bucket identified by the owner.

  • ownerId: user owner of the bucket
  • dispatchId: dispatch to add
  • Boolean

AddDispatchBucketDispatch

    core.AddDispatchBucketDispatch({ownerId="..", dispatchId=".."})

Add a dispatch to a dispatch bucket identified by the owner.

  • ownerId: dispatch owner of the bucket
  • dispatchId: dispatch to add
  • Boolean

RemoveDispatchBucketDispatch

    core.RemoveDispatchBucketDispatch({ownerId="..", dispatchId=".."})

Remove a dispatch from a dispatch bucket identified by the owner.

  • ownerId: dispatch owner of the bucket
  • dispatchId: dispatch to add
  • Boolean

UserBucketLookup

    core.UserBucketLookup({ownerId="..", handle=".."})

Lookup the bucket id for a user bucket by handle; this will create the bucket if it does not already exist

  • ownerId: user owner of the bucket
  • handle: bucket handle
  • UUID

AddDispatchLabel

    core.AddDispatchLabel({dispatchId="..", labelId=".."})    

Add a label to a dispatch

  • dispatchId: dispatch
  • labelId: label to add
  • true | false

RemoveDispatchLabel

    core.RemoveDispatchLabel({dispatchId="..", labelId=".."})    

Remove a label from a dispatch

  • dispatchId: dispatch
  • labelId: label to add
  • true | false

DispatchHasLabel

    core.DispatchHasLabel({dispatchId="..", labelId=".."})    

Check the label status

  • dispatchId: dispatch
  • labelId: label to add
  • true | false

ApplySelectedDispatchFields

    core.ApplySelectedDispatchFields({dispatchId="..", fields={taskState=".."}}})    

Update specific fields

  • dispatchId: dispatch
  • fields: map of fields ot update
  • taskState
  • updateMessage
  • programId
  • linkedId
  • security
  • true | false