Task management via API
Overview
Tasks in FA allow the user to track processes and workflows:
Manual tasks that you can use to record interactions with customers.
Process tasks that let you follow automated processes, such as transaction import or reconciliation.
You can manage tasks via GraphQL API. The GraphQL API enables you to:
Search individual or multiple tasks, see the Get task datasection.
Import, modify or delete tasks, see the Import, modify or delete a tasksection.
You can find an example of the API's task JSON object in the Task data structuresection.
Task data structure
The task attribute values are dependent on the data that has been entered for a task, the environment's configurations and task type (manual or process). You can find the fields of a task described in the FA Back Reference article Task window. In the GraphQL API tasks are represented with an object TaskData. You can find an example of the TaskData JSON object below:
"task": { "assignee": "example.user", "attachments": [ "Example1.pdf", "Example2.pdf", ], "category": null, "createDate": "2022-06-03", "description": "This is an example task", "dueDate": "2022-06-03", "durationTime": "01:30", "endTime": null, "owner": "example.user", "priority": 50, "processDefinitionId": null, "processInstanceId": null, "reference": "reference123", "taskId": "745703", "title": "Example task", "type": "Meeting" }
Get task data
You can search tasks by using following functions in the query endpoint:
Individual task: task(taskId).
Multiple tasks: tasks(filter, Type, maxCount).
Search functions return you one or many TaskData objects. The TaskData object has functions for querying task attachments and linked contacts. You can find details of tasks-related functions in the FA Developer App's GraphQL API viewand the schema documentation embedded in it.
Import, modify or delete a task
You can create, modify or delete tasks by using following functions in the mutation endpoint:
Create a task: saveTask(Task, linkedContactIds).
Delete a task: deleteTask(taskId).
Add an attachment to a task: addTaskAttachment(name, content, taskId).
Delete an attachment from a task: deleteTaskAttachment(name, taskId).