ServiceDesk API User Guide

Ressources and examples

This topic has been already fully documented on the Wello API website. Please find more information there but also code examples and source code ...

Task workflow

As Integrator, you need to handle all the different actions that can happens on a task.
To help you, we are listing them below .
Some of them will maybe not happen, or not often. But they are all possible on the system.

There are 2 different ways to work on a task :
* Simple : task created, task assigned, task closed
* Escalation : task created, task assigned, task escalated, job planned, job in progress, job completed, task closed

  • Task Created
    You just send the task.
    task.contact_id filled with the logged contact (cf Credentials)
    task.company_id filled based on the logged contact (1st company found)
    task.created_by_servicedesk_api is set to TRUE
    task.task_priority_id+task.task_type_id are filled with default value if empty
  • Task Assigned
    The task is picked up by someone.
    task.date_assigned,task.assigned_to_user_id are filled.
  • Task Updated
    Dispatcher changes the priority, type, or adapt the description.
  • Task Company changed
    The Dispatcher can change on which company this task belongs. This can give issue because the new company selected is maybe not one of the company the contact has access.
    Due to that, the task will be hidden (=invisible) to the service desk with these credentials (Rights are applied).
  • Task Escalated (Jobs created)
    The Dispatcher can decide to escalate the task to a Job (Work order). In this case, the whole workflow about jobs are applied.
    jobs.source_id_in_table will be filled with task.id
    Job created has by default the status "To Be Plan" , jobs.job_status_id=497ACFF2-9FF6-4C94-85DD-DAA0689553E2
  • Jobs Planned
    The Job is planned on a technician.
    Job status is "Planned", jobs.job_status_id=10F456D2-000E-48EA-93D7-E016107B7A98
    You can find more information of the planning (technician name, date start/end) by querying entity JobPlanningView
  • Jobs Canceled
    The Dispatcher can decice to cancel the jobs at any time.
    In this case the job status will be "Canceled", jobs.job_status_id=06EA451C-5863-4C97-9592-CC928DFDF869
  • Jobs Completed
    When the technician has finished his job and nothing else need to be done.
    Job status is "Completed", jobs.job_status_id=6557B9DC-6106-4327-8E26-6F24D0329C33
    jobs.date_closed is filled automatically.
  • Job Approval and PDF Generated
    You can query entity JobApproval which is needed if you want to receive the JobApproval PDF.
  • Task Closed
    The task receive a status 'Closed', means nothing else can be done anymore and all is finished.
    task.archived set to TRUE, task.date_closed filled

Task.date_closed vs jobs.date_closed

Be aware that these 2 values are not always the same.
When the jobs escalated is set to completed, the task is not directly updated.
It's a manual action done by the dispatcher.
This is why the task.date_closed will be always higher than jobs.date_closed

Sending Task

HTTP Method : POST
HTTP Url : /api/Task
HTTP Request body :at least field subject

Retreiving Task updated

To help you to have more information directly available, you can query the entity TaskView.
This one Contains the entity fields but also the related foreign key fields.
TaskView supports only GET.
HTTP Method : GET
HTTP Url : /api/TaskView?$filter=date_create+gt+'2014-09-07T15:09:39.079Z'&$orderby=modified_dateutc+asc

Retreiving Job Approval PDF

As explained on Wello API, differents kinds of file (like Task Files or Job Approval PDF) are available on the table db_file.
You can use the entity DbFileView with OData to query the rows.
For more information about the links and tables involved on the JobApprovalPDF, please consult Wello API.

HTTP Method : GET
HTTP Url : /api/DbFileView?$select=id_in_table,file_name,modified_dateutc&$filter=modified_dateutc+gt+'2014-09-07T15:09:39.079Z'+and+file_type_name+eq+'JOB_APPROVAL'&$orderby=modified_dateutc+asc

Be aware that the content of the file is not directly available on the DbFileView. To have the content, you need a specific call foreach db_file.

HTTP Method : GET
HTTP Url : /api/DbFile/GetFileContent?id=c9083c22-7da7-4161-977b-e28aa82f98ea

To know on which task it belongs, you need to do the following :
- With DbFileView.id_in_table, you need to GET the object JobApproval (/api/JobApproval(%DbFileView.id_in_table%))
- With JobApproval.jobs_id, you need to GET the object JobsView (/api/JobsView(%JobApproval.jobs_id%))
- The field JobsView.source_id_in_table contains the %task.id%