Блог EN
Partially completed Telegram bot form resuming from its saved step.
Telegram and Automation

Unfinished Telegram bot enquiries keep accumulating: how to resume without re-entering answers

A customer starts a Telegram bot enquiry, enters a service, city and contact details, then leaves before submitting it. When they return, the bot asks the same questions again. Restarting can lose useful answers or lead to abandoned enquiries. A reliable continuation should reuse only valid, authorised answers, with clear rules for retention, expiry, schema changes and starting a genuinely new request.

Treat a draft as a business state, not as a collection of chat messages

A Telegram message is not a completed order. Record a draft identifier, the user's verified relationship to the record, the current step, validated answers, last update time, questionnaire version and draft status. Mark the enquiry submitted only after the customer has reviewed and confirmed the completed information and the agreed receiving system has recorded it.

Define why each personal field is collected, how long it may be retained, who can access it and how deletion or withdrawal is handled. Do not keep sensitive answers indefinitely merely because the bot can store them. Clarify which previous answers may be shown again and which require fresh confirmation. Telegram bot development can include server-side draft storage, but it is not automatically provided by Telegram or included in every project.

Resume at the correct step, not just the last button

When the customer opens the bot again or sends /start, check for an active draft belonging to their authorised account. If one exists within the agreed retention window, offer “Continue” and “Start again”, with a safe way to inspect or correct saved answers. Do not assume the last displayed step is still valid: changing a selected service may invalidate later fields. A short summary can be more helpful than immediately jumping into the middle of a changed form.

The bot scenario and acceptance specification is relevant here because re-entry, cancellation, free-text input, changed answers and data handover must be specified as distinct transitions. Each button must check the current draft status, not rely on the appearance of an old Telegram keyboard.

Make repeated events and interruptions safe

The Bot API delivers updates to an application; it is not the business database storing a complete draft. The chosen backend or connected system must persist the draft deliberately. Handle repeated update_id values, delayed callbacks, two active devices, server failures and obsolete buttons. A repeated callback must not create another application or unexpectedly replace valid answers. Check the authorised user and current version on every consequential action.

For an existing bot, inspect where state is stored, whether the database has backups, what happens if the CRM is down and whether a pending enquiry can be recovered without changing its meaning. The Telegram bot testing checklist covers interrupted journeys, retries and permissions. It is not evidence that any existing installation has passed those tests.

Hypothetical TASK-100: continue a five-step enquiry

Training enquiry D-100 has five steps: (1) service, (2) city, (3) contact, (4) task description and (5) confirmation. The customer completes the first three steps, leaves, and returns two hours later. The draft is still within the retention period agreed for this fictional product. The correct next step is the description, not a second request for the same service, city and contact.

  1. After each valid response, save the answer, D-100 identifier, authorised user, updated timestamp and current step, confirming that the write succeeded.
  2. On return, display that an unfinished D-100 was found. Offer continuation or a permitted discard-and-restart action, applying the approved retention policy.
  3. If the customer continues, display the saved answers for review and proceed to step four. If a dependency has changed, invalidate only the affected values and explain which answer needs correction.
  4. Before submission, show all five values and require explicit confirmation. A draft is not a submitted enquiry and must not be reported to staff as a final order.
  5. Test a second device, a repeated callback, an expired draft, another account attempting access and interruption while writing to storage.

Positive test: D-100 resumes from step four, keeps the three approved values and creates exactly one submitted enquiry after confirmation. Negative test: the bot reveals someone else's contact, duplicates a submission, treats the draft as complete or restores personal information beyond its authorised retention period. These are release-blocking defects, not cosmetic mistakes.

Define the handover and the scope of the quote

Provide the existing questionnaire, required fields, active bot or integration description, current state storage, applicable data retention rules, staff roles and anonymised examples of interrupted conversations. Deliverables may include the draft schema, resume and edit controls, expiry and deletion logic, duplicate protection, permission checks, test scenarios and a recovery procedure.

For an individual estimate, share those materials through agency contacts. The published Telegram bot proposal outlines forms, business processes and integrations, but restoration of existing drafts, migration of abandoned enquiries and custom storage architecture must be agreed as separate project scope. A working “Back” button alone does not satisfy the requirement.

A second state model: signage enquiry DR100-1

In a separate fictional example, bot D-100 collects details for making a sign: product type, size, material, address, contact and final confirmation. The customer has answered the first three questions, then returns the next day. Store draft DR100-1 with those three validated answers, user identifier, last modification time, scheme revision, required processing notice or consent status where applicable, and an agreed expiry. This six-part sign enquiry is a separate example from the earlier five-step service form.

  1. Open DR100-1 as draft; show a concise summary of the previously supplied product type, size and material, with options to continue or edit them.
  2. On re-entry, continue at the address field, the fourth data step, if the draft has not expired and earlier answers remain valid. A return after one day is allowed here only because the fictional retention policy permits it.
  3. If the form version changes and material becomes newly mandatory, compare the stored schema with the active one and request only missing or invalid data rather than silently assigning a default.
  4. At confirmation, save exactly one submitted record and its identifier. Distinguish saving intermediate draft data from transferring a completed application to the manager or CRM.

Recovery and negative tests for TASK-100

Positive: the same authorised user opens DR100-1, checks the first three answers, supplies the remaining fields and receives the ID of one submitted enquiry. Negative: every /start creates a new record, a different Telegram account sees previous answers, or an unfinished draft appears in the manager's system as an approved order.

Also test an expired retention period, deletion request, withdrawn permission or consent where relevant, temporary database unavailability, conflicting actions on two devices and a duplicate submit after a slow response. The client should see a truthful pending or failed state and a safe retry path. Bot monitoring and recovery guidance helps structure post-outage reconciliation: do not assume missing server records can always be reconstructed from Telegram updates.

Acceptance requires the correct resumed step, no unauthorised disclosure, no lost accepted answers, clear expiry handling, one final submission per confirmed action and a visible error state on failure. Specify backup and retention responsibilities in the technical brief rather than promising data durability when the database, access controls or recovery plan are unknown.