Working with CommonLynk as an agent
For an AI agent or a script building forms for a person: the addresses, the import routine, knowing a run has finished, the report, undoing an update, and what blocks publishing.
An agent acting for a signed in person uses the same pages the person uses, with that person's permissions; there is no separate interface. Every address below is on the workspace's own address and needs the person's session.
Addresses
| Address | What it is |
|---|---|
/forms/import/xlsform/ | Import a new form from a workbook. A preview runs first and saves nothing. |
/forms/import/xlsform-update/?form=<form id> | Update an existing form from a changed workbook. Questions are matched by name and keep their answers. |
/forms/import/xlsform/runs/<run id>/status.json | A run's state as JSON, read with GET only. An update run has the same address under the update's import page. |
/forms/import/xlsform/report/<run id>/ | The run's report, row by row. Add report=errors or report=warnings to the query to filter it. |
/forms/<form id>/build/ | The form's Design tab: its questions as they are now. |
/forms/<form id>/check/ | The form check: every error that blocks publishing and every warning, each named on its question. |
/forms/<form id>/preview/?start=<variable> | The designer's preview: the form as a collector sees it, opened at the question named in start= (its variable name). It can fill every required answer with test values and saves nothing. The fill page does not read start=. |
/forms/<form id>/ | The form's Overview, with its version history. |
/forms/<form id>/versions/<version>/restore/ | Restore a published version as a draft: open it to read what changes, then confirm. |
/llms-full.txt | This whole user guide as one text file, on the public website. |
The routine
- Import: upload the workbook on the import page. A preview runs first and saves nothing.
- Preview: wait until the run has finished, as described below, then read the notices and the rows that need attention. Each names its row and what was lost.
- Commit: confirm the preview on the same page. The commit runs exactly the preview's file and options.
- Check: open the form check. Fix each error in the workbook and update the form with it, rather than editing by hand, so the workbook stays the source.
- Publish: when the check shows no error, publish from the form's header. Publishing is never automatic: an import or a restore always leaves a draft.
What blocks publishing
The publish gate refuses a form while any of these errors holds:
- Pengaturan yang ditunda (milik apa formulir ini, asal responden, kelompok responden, atau jenis formulir) masih belum ditentukan.
- Formulir ini tidak memiliki pertanyaan.
- Dua pertanyaan memiliki nama yang sama.
- Nama pertanyaan merupakan kata yang dicadangkan oleh SPSS atau Stata.
- Batasan atau perhitungan merujuk pada pertanyaan yang tidak ada.
- Kondisi merujuk pada pertanyaan yang tidak ada.
- Teks pertanyaan, catatan, atau bagian menampilkan ${name} untuk pertanyaan yang tidak ada.
- Tes pengetahuan tidak memiliki jawaban benar pada pertanyaan mana pun.
- Sebuah label tidak memiliki teks dalam bahasa desain formulir atau bahasa utama ruang kerja.
- Responden berasal dari kegiatan yang dipilih pada setiap respons, yang dapat menambahkan orang baru, tetapi belum ada kelompok responden yang dipilih.
- Responden berasal dari daftar atau roster, tetapi belum ada kelompok responden yang dipilih.
- Sumber responden tidak dapat menghasilkan siapa pun.
- Dataset yang dibaca oleh pulldata() tidak dilampirkan, atau tidak memiliki kolom yang dibacanya.
- The form has preloaded answers but no respondent list, so no row can be matched to a respondent.
- Tautan publik diatur untuk memverifikasi pengisinya, tetapi belum ada pertanyaan verifikasi yang dipilih.
- Tautan publik diatur untuk memverifikasi pengisinya, tetapi NIK maupun nomor telepon tidak ditanyakan, sehingga tidak ada orang yang dapat ditemukan.
- Tautan publik memverifikasi orang berdasarkan nama tanpa NIK atau nomor telepon, baik secara tersendiri maupun bersama kode akses bersama.
- Tautan publik memverifikasi orang hanya berdasarkan nomor telepon, tetapi orang tersebut tidak diwajibkan terdaftar dalam daftar responden.
- Tautan publik diatur untuk memverifikasi pengisinya, tetapi respondennya bukan individu.
- Tautan publik diatur untuk memverifikasi bahwa orang tersebut terdaftar dalam daftar responden, tetapi formulir tidak memiliki daftar responden.
- Respons formulir akan digunakan untuk mendaftarkan orang, tetapi ada kolom wajib dalam register yang tidak ditanyakan melalui pertanyaan wajib yang dapat ditampilkan (terikat dengan cl::bind atau Lynked).
- Pertanyaan turunan memiliki pilihan yang tidak cocok dengan pilihan pertanyaan induknya, atau ada pilihan induk yang tidak memiliki pilihan turunan, sehingga jawaban wajib dapat menjadi mustahil diisi.
The settings a new import most often leaves undecided can be set in the workbook's commonlynk sheet, so the form arrives ready:
form_typesubjectregisters_peopleoff_list_policy
What the form belongs to and where its respondents come from are chosen in the form's Settings. Warnings never block: they are published once acknowledged.
Knowing a run has finished
A run has finished when its status.json says finished is true; succeeded then says whether it completed. The page shows the words for an outcome only once it is final, never before, so an agent reading the page cannot read an outcome early.
{"finished": true, "succeeded": true, "state": "completed", "report_url": "…"}
Read status.json every few seconds at most, and stop after a time limit of your own. A run whose worker stopped is reported as interrupted.
The report
status.json carries report_url. The report lists every row with its outcome and the issues found, and the import page's notices summarise them. Read the rows that need attention first.
Undoing an update
An update from a workbook changes questions in place, so the import's own Undo cannot reverse it. Restore the form's previous published version as a draft instead: the update run names that version and its address. Open the restore page, read what it would change, and confirm.
A restore keeps every answer: a question the version lacks is retired with its answers, and a question it has comes back with the answers it kept. It never publishes; publish again after the check.
Trust the screen
This guide and the text file are generated. The form check, the import preview and the report read the actual form. When they disagree with this guide, trust the screen, and tell the person you work for.
Two other topics complete this one: the XLSForm reference, and porting from ODK, KoboToolbox and SurveyCTO.
/docs/forms-and-data-collection/xlsform-reference//docs/forms-and-data-collection/porting-from-odk-kobo-and-surveycto/