Diagnose and remediate questionnaire field values being cleared or zeroed out in contracts created via integration workflows (HubSpot, Salesforce). Use this skill when a customer reports that contract fields populated from an integration are missing, zeroed out, or reset after the questionnaire is edited in SpotDraft. Trigger on phrases like: 'questionnaire values reset', 'HubSpot data missing from contract', 'fields showing 0', 'integration data cleared', 'SFDC values wiped', 'data disappeared after editing', or any report of contract fields not matching what was pushed from HubSpot/Salesforce. Also use if investigating the March 4–17 2026 regression that affected 15+ customers with hidden integration-mapped questions.
Integration-sourced questionnaire variable data is wiped when a contract's questionnaire is edited in SpotDraft, if the associated question items are hidden behind an always-false visibility condition (e.g., sd_show = false). The initial data push from the integration bypasses visibility checks, but any subsequent questionnaire edit triggers a re-evaluation that clears values for hidden questions.
March 4–17, 2026 regression: A platform change deployed on March 4 (for BIC) that stopped persisting questionnaire responses for hidden questions made this behavior systemic. It broke an existing Legal Ops workaround used across 15+ customer workspaces. Fix deployed March 17 via feature flag. Contracts created March 4–17 on affected workflows may have missing field values — there is no backfill path.
Check contract data entries to confirm missing values (Prod US):
SELECT id, source, is_completed, critical_update, created, modified
FROM `spotdraft-prod.prod_usa_db.public_contracts_v3_contractdata`
WHERE contract_id = {contract_id}
ORDER BY created DESC
LIMIT 10
Look for the pattern:
source: Info-Collection, is_completed: False, critical_update: True — values present (initial HubSpot push)source: partial-save or source: Info-Collection with is_completed: True — values absent/zeroed (result of questionnaire edit)Check contract state (Prod US):
SELECT id, status, contract_kind, workflow_status, created, modified
FROM `spotdraft-prod.prod_usa_db.public_contracts_v3_contractv3`
WHERE id = {contract_id}
Check contract version history:
SELECT id, version_number, sub_version_number, action, is_current, created
FROM `spotdraft-prod.prod_usa_db.public_contracts_v3_contractversion`
WHERE contract_id = {contract_id}
ORDER BY version_number DESC, sub_version_number DESC
LIMIT 10
⚠️ Run BQ queries one at a time — parallel
execute_sqlcalls return 500 errors.
| Environment | BQ Project | Dataset | Table Prefix |
|---|---|---|---|
| QA India | spotdraft-qa | qa_india_public | (none) |
| QA EU | spotdraft-qa | qa_eu_public | (none) |
| QA USA | spotdraft-qa | qa_usa_public | (none) |
| Prod India | spotdraft-prod | prod_india_db | public_ |
| Prod EU | spotdraft-prod | prod_eu_db | public_ |
| Prod USA | spotdraft-prod | prod_usa_db | public_ |
| Prod MEA | spotdraft-prod | prod_mea_db | (none) |
Search for questionnaire save events for a contract (Prod US):
logName="projects/spotdraft-prod/logs/stderr"
resource.labels.cluster_name="prod-usa"
jsonPayload.message:"{contract_id}"
severity >= ERROR
QA equivalent:
resource.type="k8s_container" labels."k8s-pod/app"="spotdraft-qa-django-app"
textPayload:("{contract_id}") textPayload:("questionnaire" OR "question_item" OR "contract_data")
| Cluster | Contract Data | Frozen Question Variable | Workflow Admin |
|---|---|---|---|
| US | https://api.us.spotdraft.com/admin/contracts_v3/contractdata/?contract_id={contract_id} | https://api.us.spotdraft.com/admin/questionnaire_v2/frozenquestionvariable/?template_id={template_id} | https://api.us.spotdraft.com/admin/workflow_v1/workflow/{workflow_id}/change/ |
| IN | https://api.in.spotdraft.com/admin/contracts_v3/contractdata/?contract_id={contract_id} | — | https://api.in.spotdraft.com/admin/workflow_v1/workflow/{workflow_id}/change/ |
| EU | https://api.eu.spotdraft.com/admin/contracts_v3/contractdata/?contract_id={contract_id} | — | — |
Use when:
sd_show)Do not use for:
ContractDataWhen a user edits the questionnaire via the SpotDraft UI (or when the platform re-evaluates it):
condition_as_json_logic or condition_as_complex_expressionContractDataImplementation teams sometimes hide integration-mapped questions from the UI by placing them behind a condition that always evaluates to false — typically a dummy variable like sd_show (which has no questionnaire field and no default, so it is never set to true). This achieves the goal of hiding the field from sellers, but creates a data-loss risk on any questionnaire edit.
Technical form of the condition:
condition_as_json_logic contains {...sd_show = false...}condition_as_complex_expression = Equals(intake.sd_show, False) with condition_as_json_logic = nullAsk the support person for:
https://app.spotdraft.com/contracts/v2/{contract_id})Check contract data in Django Admin: