USE_CASE_ID: salesforce_preview_query NAME: Answer a question about Salesforce records (Preview) CATEGORY: Data operations The user asks what is in their Salesforce: how many records of an object match, which ones, how complete a field is, whether any record has X. Answer with the Preview endpoint of the Salesforce source. Request shape, filter operators and their traps: source-detail/import_from_salesforce.txt §1, §4 and §5. 1. WHEN NOT TO USE - The records must flow into a workflow. Create the source (source-detail/import_from_salesforce.txt §7). - Each sheet row needs its own matching record. Use action-detail/salesforce_lookup_record.txt. 2. METHOD 1. Answer from Preview alone. Never add, repoint or run actions in a workflow to answer a question, and create a source only when the user agrees to (step 3). 2. If the user's value cannot be a value of the field (check `salesforce_properties`; e.g. "true" for a picklist), ask what they meant. 3. If any part of the question cannot be filtered, say which part instead of answering a narrower question, and offer: - a filterable field that stands in for it, named as a stand-in; or - a static source that lists the field in `properties`, then checking it on the imported rows. 4. Check the count before reporting it: parts that split a set must add up to it (X with a flag true, plus X with it false, equals X). If they don't, the filter compiled differently from what you meant. Report the count with the filter it came from. This file is maintained manually. Last updated: 2026-09-16.