Tasking Setup
Overview
Tasking lets you define and assign short prerequisite activities — called Tasks — to field workers. A task must be completed by a given due date. Completion is recorded automatically based on the task type. Connect supports two task types:
Relearn: The user submits one or more forms using a CommCare application, configured on CommCareHQ.
OCS: The user dialogue with a chatbot configured on Open Chat Studio.
Relearn Task
This section covers the changes needed in your CommCare HQ application to support Tasking. These steps are specific to this feature and are separate from the standard Connect app setup.
Register Task Units
Each form in the HQ app that corresponds to a Connect Task must be registered as a Task Unit:
In the CommCare application builder, go to the task form's settings.
Register the form as a Task Unit under the app's Connect settings.
Each Task Unit gets an ID (slug) — note this down carefully. It must be entered exactly when creating a Task Type in Connect.
Task Form — Conditional Visibility
The task form should only appear for a worker once they have been assigned that task. Control this with a case property:
When creating a Task Type in Connect, set a Case Property (e.g.
training_complete).Connect sets this property to
1on the worker's CommCare user case when the task is assigned.In the HQ app, add a relevance condition to the task form: show only when the case property equals 1.
On the worker's next sync, the form becomes visible.
Example — Training Task end-to-end
Task Unit ID registered in HQ app:
community_trainingTask Type created in Connect: slug =
community_training, case property =training_completeWorker is assigned the task in Connect → HQ user case updated:
training_complete = 1→ training form appears in app on next syncWorker submits the form → Connect automatically marks the task as Completed
OCS Task
This section covers the configuration needed on Open Chat Studio (OCS) to support Tasking.
You need an active OCS account to be able to create and assign OCS tasks to users.
Configuring OCS
Completing a Relearn task is as simple as submitting a form, but that is not the case with an OCS task, as completion of these tasks hinge on when the conversation with the bot is considered “done“. Once the conversation is done the bot need to take certain steps to tell Connect that the conversation is done. Luckily OCS supports mechanisms like Custom Actions to make this possible.
The process of configuring OCS is as follows:
Create Authentication Provider so OCS authenticate to Connect
Create Custom Action so the bot can talk to Connect
Tell the bot to use the custom action when the conversation is done
Ensure CommCare Connect channel is active for the bot
Creating an Authentication Provider
Navigate to Team Settings
Under Authentication Providers click Add new → OAuth (Client Credentials)
Find details in 1Password by looking for “OCS OAuth credentials“
Leave “Scope“ empty
Leave Token Endpoint Authentication to be “HTTP Basic”
Creating a Custom Action
We’ll add a custom action that
Pulls the participant data from the conversation
Makes an API call to Connect on conversation completion
Before we configure the custom action it’s important to first configure an Authentication Provider, which is how the custom action will authenticate with Connect.
Steps for adding the custom action
Navigate to Team Settings
Under Custom Actions click Add new
Fill in an appropriate name - something like “Connect Task Completion Action“
Select the newly created authentication provider as the Auth setting
Additional Prompt: “Extract the connectTaskId from the participant data and populate it in the API schema."
Base URL: https://connect.dimagi.com
API Schema:
{ "info": { "title": "API", "version": "1.0" }, "paths": { "/api/task_completed/": { "post": { "responses": { "200": { "description": "OK" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "connectTaskId": { "type": "string" } } } } } } } } }, "openapi": "3.0.0" }Make sure the “POST” is selected under Allowed operations
Now you have a custom action that is ready to be used by your bot to notify Connect when a conversation is done.
How to use the Custom Action
In your bot’s pipeline find the LLM Node and click on Advanced to open all the node’s settings.
Scroll down to Custom Actions and tick the custom action your created in the previous step
Find the Prompt input and make sure you tell the bot to trigger the custom action when the conversation is done by using the participant data. Something like this:
...when done make the API call to mark the task completed and use the user's participant data:
{participant_data}
When is a conversation “done“?
This depends entirely on your use-case, but it is important to give the bot very clear guidelines for when a conversation can be considered “done“, as the bot will trigger the custom action when it thinks the conversation is done, marking the task as “done“ on Connect.
Create CommCare Connect Channel
The CommCare Connect channel is behind an OCS feature flag, so reach out to the OCS team to get this set up.
The last step is to make sure the bot supports conversations on the CommCare Connect channel.
Navigate to Chatbots → select your bot
At the top of the page select to create a new channel → CommCare Connect
Tasking
Create Task Types
A Task Type is a reusable template for a task — defined once, assigned to workers as needed.
Steps for adding a Relearn task
Navigate to Opportunity → Configure → Task Types.
Click Add Task Type.
For Task mode select Relearn.
Select a Task Unit from the linked CommCare HQ app.
Fill in:
Name — shown to the worker in the Connect app.
Description — what the task involves.
Case Property (optional) — the HQ user case field set to
1on assignment to unlock the task form in the app.
Save.
Task Type Fields Reference
Field | Description |
|---|---|
Name | Display name shown to the worker |
Description | Full description of the task |
Slug | Auto-filled from the HQ Task Unit ID. Do not edit manually. |
Case Property | HQ user case property updated to |
Is Active | Only active task types can be assigned |
Archived | Hidden from new assignments but historical records are preserved |
Do not change the slug
The slug is set automatically when you select a Task Unit. It must match the Task Unit ID in the CommCare app exactly. Changing it will break task completion tracking.
Steps for adding an OCS task
Navigate to Opportunity → Configure → Task Types.
Click Add Task Type.
For Task mode select Open Chat Studio.
If your OCS account is not linked, click “Connect OCS account“, then proceed to the next step.
Select the appropriate Chatbot.
Fill in:
Name — shown to the worker in the Connect app.
Description — what the task involves.
Save.
Assign Tasks to Workers
Steps
Navigate to Opportunity → Tasks → Assign Task.
https://connect-staging.dimagi.com/a/{org_slug}/opportunity/{opp_id}/assigned_tasks/
The page is not available for redirecting from the UI, so please replaceorg_slugandopp_idmanually in the URL.Select a Task Type.
Select a Worker — only active, enrolled workers are shown.
Set a Due Date (today or future).
Submit.
For assigning OCS tasks you need to have your OCS account linked to Connect - if you haven’t linked your account Connect will prompt you to do so when you select an OCS task type
What Happens After Assignment
Task appears in the worker's list with status Assigned.
If a Case Property is set: Connect updates the worker's CommCare user case — task form becomes visible in the app on their next sync.
Worker receives a push notification: "A task has been assigned to you. You must complete it before continuing Delivery activities."
How Task Completion Works
No manual action is needed.
For Relearn tasks this happens once a worker submits the task form:
CommCare HQ receives the form and forwards it to Connect.
Connect matches it to the worker's assigned task.
Task status is automatically updated to Completed with the submission timestamp.
For OCS tasks this happens when the bot thinks the conversation is done:
The OCS bot triggers the custom action
The custom action reads the task ID from the participant data and prepares a payload to be sent to Connect
The payload is sent to Connect and Connect marks the task from the payload as complete.
Task Status Reference
Status | What it means |
|---|---|
Assigned | Task assigned; worker has not yet submitted the form |
Completed | Worker submitted the form; recorded with completion timestamp |
Troubleshooting
Problem | Action |
|---|---|
Task never marked as Completed after worker submits | Verify the Task Type slug exactly matches the Task Unit ID in the HQ app (case-sensitive) |
Task form not visible in worker's app | Check the Task Type has a Case Property set; verify the worker's CommCare identity is linked; try re-assigning the task |