A developer wants to configure an automation to import files placed on the SFTP shared by a customer's data vendor. The automation will start when a file matching a specific namingpattern is encountered in the Import folder. The first step of the automation is a File Import Activity referencing a substion string for the matching file. Which substituon string represents the name of the file?
In Salesforce Marketing Cloud Engagement, a File Drop Automation can use a substitution string in its File Import Activity to identify the exact file that triggered the automation. The %%FILENAME_FROM_TRIGGER%% substitution string dynamically returns the name of the file placed in the monitored FTP folder. This avoids hardcoding filenames and allows the import activity to process files that match the configured naming pattern.
Correct Option:
Option C – %%FILENAME_FROM_TRIGGER%%
This is the correct substitution string for referencing the filename that triggered a File Drop Automation. Salesforce documentation specifies that it returns the name of the file placed in the FTP folder. It allows the File Import Activity to use the triggering file dynamically, rather than requiring a fixed filename. This is particularly useful when vendors upload files with changing names or date-based naming conventions.
Incorrect Option:
Option A – %%FILENAME%%
This is not the documented substitution string for retrieving the filename that triggered a File Drop Automation. Using it will not provide the required trigger-file reference in the Import Activity. Salesforce provides dedicated trigger-related substitution strings for passing the dropped file's name into subsequent automation activities. Therefore, this option does not meet the requirement.
Option B – %%TRIGGER_FILENAME%%
This is not the valid Salesforce Marketing Cloud substitution string for retrieving the triggering file's name. Although its wording appears relevant, Salesforce uses the specific syntax %%FILENAME_FROM_TRIGGER%%. Substitution strings must match the documented syntax exactly; changing the word order or omitting part of the name makes the expression invalid for this purpose.
Option D – %%FILENAME_FROM_IMPORT%%
This is not a documented substitution string for identifying the file that started a File Drop Automation. The requirement is to retrieve the filename from the automation trigger, not from an import activity. Salesforce provides %%FILENAME_FROM_TRIGGER%% for this purpose, making this option incorrect.
Reference:
Salesforce Marketing Cloud Engagement Help documentation, “Substitution Strings Example,” explains how to use %%FILENAME_FROM_TRIGGER%% in File Transfer and Data Copy or Import activities to reuse the file that triggered an automation.
