Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This method

...

This method gets the history of an order’s status changes and messages.

...

The result is a JSON object with these properties:

...

current

...

Contains the current order’s status.

...

object

...

current.status

...

The current (numeric) status. See Order status

...

integer

...

count

Total events (aka traces).

integer

items

Array of events

object[]

canAdd

Boolean. If true then the connected user has the right to add a new message to the order.

bool

Each element in items is an object with these properties:

Array with all status transitions available given the context

date

Event date.

datetime

message

Optional user message, if one was included with the event. Please note that message are sometimes auto-generated by the system and not originating from a client.

string?

status

The order status at the time of the event. See Order status for all options.

integer

statust

Status print title.

string

transitions

deadline

The deadline of the order

. These are typically the transitions that a regular user can choose from. Only internal managers can side step this list.

Example:

Code Block
"transitions": [
{
	"title": "Close order",
	"status": 5,
	"statust": "Closed",
	"isDefault": true,
	"instructions": "Click OK to confirm that this order can be closed."
},
...
]
See table

at the time of the event. With this property one can easily identify any changes to the deadline.

datetime?

sender

The originator of the event. This can be the client when the client changes the status or submits a message. Or, it can be a manager who answers a question or amends the deadline.

See below for details.

object[]

overrides

An array of status transitions that a manager-level user has access to. Whereas transitions are the recommended statuses, overrides are used to fix any issues or handle exceptions.

The overrides contain the numeric status code and the print title.

The list is empty unless the user is an internal manager.

Example:

Code Block
"overrides": [
{
	"status": 3,
	"statust": "Work done"
},
...]

object[]

The transitions node contains zero, one or more status transitions, each with these properties:

...

title

...

The print title of the transition. Such as “Close work” to transition to status “Closed”.

...

string

...

status

...

The current (numeric) status. See Order status

...

integer

...

statust

...

Status print title.

...

string

...

isDefault

...

True if this is the default transition in the present list of transitions. In a user interface this would be highlighted as the default action.

...

bool

...

instructions

...

Additional information for the user about purpose and result of transition.

...

string

EXAMPLE

A typical result as seen by an internal manager. Other users including clients will see an empty overrides list.

The order status tells that the client has accepted the deliverables. The manager is now given two transitions: Close the order or re-open work in case something was missing. Nevertheless, the manager can also transition to any other status as shown in the overrides list. To make a status change you would use method orders/{orderId}/status (PUT) The sender has these properties:

pid

The user (person) who triggered the event or trace.

If an event is triggered by the system, it will impersonate the platform administrator.

integer

pfname

User first name.

string (*)

plname

User last name.

string (*)

cid

User’s company ID.

integer (*)

cname

User’s company name.

string (*)

(*) If the user (pid) has been deleted then all other properties above are null.

EXAMPLE

An example for typical events in an order:

Code Block
{
    "

...

count": 

...

16,
    

...

"

...

items": [

...

        {

...

 

...

 

...

     

...

     "

...

date": 

...

"2022-11-11T14:48:36.517Z",
  

...

          

...

"

...

message": "

...

Thank you for this information",
            "status": 

...

2,
            "statust": "

...

In progress",
            "

...

deadline": 

...

"2022-10-28T11:00:00Z",
            "

...

sender": 

...

{

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 

...

 "pid": 201,
      

...

          

...

"

...

pfname": "

...

Marcus",
            

...

 

...

   

...

"plname": "

...

Leen",
            

...

 

...

   

...

"cid": 

...

76,
           

...

     

...

"cname": 

...

"Henderson Inc"
            }

...

 

...

       

...

},
        {
            "

...

date": 

...

"2022-11-11T14:31:14.183Z",
            "

...

message": "

...

We will deliver tomorrow, a day 

...

earlier :-)",
            "status": 2,
            "statust": "In progress"

...

,

...


 

...

           

...

"

...

deadline": 

...

"2022-10-28T11:00:00Z",
            "

...

sender": 

...

{
 

...

         

...

      "pid": 562,
 

...

               "

...

pfname": 

...

"John",
                "

...

plname": "

...

Mann",
        

...

        "cid": 537,
   

...

 

...

            "

...

cname": "

...

Translation Profis"
         

...

   }
 

...

     

...

 

...

 }
   

...

 

...

],
    "

...

canAdd": true
}

ACCESS RIGHTS

This method is available to any user (clients, internal users) who has access to the given order online.

...