This topic has been already fully documented on the Wello API website. Please find more information there but also code examples and source code ...
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.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 TRUEtask.task_priority_id+task.task_type_id are filled with default value if emptytask.date_assigned,task.assigned_to_user_id are filled.jobs.source_id_in_table will be filled with task.idjobs.job_status_id=497ACFF2-9FF6-4C94-85DD-DAA0689553E2jobs.job_status_id=10F456D2-000E-48EA-93D7-E016107B7A98JobPlanningView
jobs.job_status_id=06EA451C-5863-4C97-9592-CC928DFDF869jobs.job_status_id=6557B9DC-6106-4327-8E26-6F24D0329C33jobs.date_closed is filled automatically.
JobApproval which is needed if you want to receive the JobApproval PDF.task.archived set to TRUE, task.date_closed filled
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
HTTP Method : POST
HTTP Url : /api/Task
HTTP Request body :at least field subject
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
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%