Skip to content
commcare nova

Deep links

Give a module, case list, or form a stable entry point, try it in Preview, and share a checked CommCare HQ link.

A deep link opens a named place in your app. In App setup → Deep links, you can add an entry point to an eligible module, case list, or form. Module and form settings also have a shortcut to their entry point.

Choose a destination

Each destination can have one entry point. Nova gives it a Link ID that stays the same when you rename or move the destination. A Link ID uses lowercase letters, digits, underscores and single hyphens, and starts and ends with a letter or digit. Changing that ID can break links you have already shared. Removing a destination removes its entry point too; undo restores both.

Nova shows the cases each entry point needs, including parent cases and the order and maximum for several-case selections. A module link opens that module's menu. For a module that exists to select cases for another module, this does not promise an immediate case list.

A menu that shows its forms in the menu above takes no deep link of its own; link to one of its forms.

Some destinations cannot be opened directly. A case list that starts with Search still needs its Search workflow, and a registration form shown only when Search has no matches cannot be a link destination. Nova explains the restriction when you choose a destination.

Form entry points have an Open even when display conditions hide the form setting. It applies only to entry through that link. Workers still need access to the app and cases; the setting does not grant permissions.

The same setting decides whether a link opens a form that is off the menu, or a form inside a module that is off the menu (see Display conditions):

  • In Web Apps, the link opens such a form only when the setting is on. Otherwise it opens the module that holds the form, or the app's first screen when that module is off the menu.
  • On Android, the link opens the form either way.

A module that is off the menu can't have a module link or a case list link of its own, because neither would open anything useful: Android would show a menu with nothing in it, and Web Apps the app's first screen. Link to a form inside the module instead, or show the module on the menu again.

A form listed under two menus can have a different link for each route. Give the second menu a link, then choose the form under that menu when creating its link. Workers see that menu’s case list. In Web Apps, this link follows the form’s display conditions. The form’s original link keeps its own settings. Android opens deep links without checking those conditions.

These links need the menu that owns the form to have a case type: CommCare HQ can't save the settings of a menu that lists the forms of a menu without one and holds its own form links. For a form in a menu without a case type, you can give the form its link in the menu that owns it instead.

Hiding the form in the second menu pauses its link. Showing it there again restores the same link ID. Removing the second menu’s own link also pauses its form links. You can still find them in Deep links.

Try it in Preview

Choose a Preview worker and the required cases, then open the entry point. Preview uses real Nova case data available to that worker. It checks the selected cases, parent relationships, and display conditions before opening anything. When a case is unavailable, Nova asks you to choose again.

When Preview runs as Web Apps, opening an entry point claims the cases it names, as Web Apps does. When it runs as Android it claims nothing, and you can choose a case the worker's phone doesn't have to see the form open without its saved values. Preview's case choices test your app in Nova; they do not fill the case IDs for a shared HQ link.

After publishing the app and making and releasing a version on CommCare HQ, open App setup → Publishing. Under the project space, choose the deep link and supply any required case IDs from that CommCare HQ project space. For several cases, use one ID per line in selection order.

Any committed app edits, including label changes, need to be published before Nova can create a new checked link. This keeps the case selections and destination you see in Nova matched to the published app. If the app changes during a check, Nova asks you to try again. Previously copied links continue to follow HQ.

Nova checks the entry point in the released build before generating or copying the link. If the published app, required data, or release no longer matches, Nova explains what needs attention. A saved publishing status alone does not prove that a link is ready.

The recipient signs in to CommCare HQ and needs access to the app and cases. The URL follows CommCare HQ's build selection when opened: normally the latest released version, but a recipient or project configured to use the latest build may open an unreleased one. The link is not pinned to the version Nova checked, and a later release can change its behavior.

If you change or remove an entry point, publish and release the updated app before expecting the change on CommCare HQ.

Supply IDs for new cases

A form can accept a new case ID from its link. In Deep links, choose the form and use IDs for new cases to choose the case creations the link can name. You can leave a creation unchecked to let the form generate its ID.

When trying the link in Preview, enter a fresh ID for each chosen creation. The form sees that ID as soon as it opens. Submitting creates the case with that ID. An ID already used in the app or supplied twice needs a replacement before the form can open. If another submission takes the ID while the form is open, Nova keeps the existing case and asks for a new ID.

Generating an HQ link uses the case IDs in the destination project space. Adding or removing a supplied ID changes what callers must provide. Publish and release that choice before sharing a replacement link.

On Android, a visit a deep link opens ends with its first form. Whether the worker submits that form or presses Back, CommCare returns to the app that opened the link, and the form's after-submit setting doesn't run. The next visit starts fresh. Preview's Android device shows the phone's home screen then.

A link to a menu or a case list keeps the visit going until a form ends it. Pressing Back there returns to the first menu with the first record the link supplied still selected. A menu that asks for that record under the same name then opens without asking again, as Preview's Android device shows.

In Web Apps, Back returns to a fresh first menu, and a submitted form follows its after-submit setting.