Using this Blog Post, you will be able to troubleshoot the Salesforce Agentforce Testing Center error: “No Scenario column found in CSV” error or exception. Learn how hidden UTF-8 BOM characters (\ufeff) break CSV parsing and how to fix it fast.
How to Fix Salesforce Error: “No Scenario column found in CSV”
When setting up conversation-level testing in the Salesforce Agentforce Testing Center, importing test cases via CSV is standard workflow. However, developers, admins, and architects frequently encounter this error during import:
No Scenario column found in CSV. Please create a text column named 'Scenario' for conversation-level testing.
Even when your CSV clearly has a header named Scenario, Salesforce refuses to recognize it.
Understanding the Root Cause
This error typically occurs due to one of two reasons:
- Missing or Misspelled Header: The column header is not named
Scenarioexactly (case sensitivity or typos). - UTF-8 Byte Order Mark (BOM) Contamination: This is the most common hidden cause. When saving CSV files in certain applications (such as Microsoft Excel or localized text editors), a invisible byte order mark (
\ufeff) is prepended to the very beginning of the file.
When Salesforce parses the first column header, instead of seeing:
Scenario
It interprets the raw binary header as:
\ufeffScenario
Because \ufeffScenario does not match Scenario, the validation parser fails immediately and reports that the mandatory column is missing.
Step-by-Step Resolution
Step 1: Verify Header Naming and Case
Ensure the first column header in your CSV is literally named Scenario without extra spaces, lowercase letters, or special characters.
Example valid CSV structure:
Scenario,Utterance,ExpectedResult
"Booking Test","Book a hotel in Toronto","Success"
Step 2: Strip UTF-8 BOM Encoding
To remove the hidden \ufeff prefix from your CSV file, use one of the following methods depending on your development toolchain:
Method A: Using VS Code
- Open the CSV file in Visual Studio Code.
- Look at the bottom-right status bar. If it shows UTF-8 with BOM, click on it.
- Select Save with Encoding.
- Choose UTF-8 (without BOM).
- Save the file (
Ctrl+SorCmd+S) and re-upload to Salesforce.
Method B: Using Notepad++ (Windows)
- Open the file in Notepad++.
- Click on Encoding in the top menu bar.
- Select Convert to UTF-8 (instead of UTF-8-BOM).
- Save and re-upload.