Creating Expectations
Creating Expectations involves defining three things: the success criteria, the trigger and timing, and the scope of files to watch for.
Expectation Success Criteria
Success criteria define what a valid delivery looks like. It defines "what" you're expecting to receive. Files.com evaluates the matched files against these rules when the window closes.
These rules describe the file-level requirements that need to be met by the delivered files. They let you express things like how many files must arrive, how large they must be in total, what extensions they must have, and what filenames are forbidden. Only enabled rules are evaluated.
The File Count rule specifies how many files are expected. It supports an exact number, a range, a minimum, or a maximum.
The File Size rule sets a size constraint on the combined set of matched files. It supports an exact size, a range, a minimum, or a maximum.
The Allowed Extensions rule limits which file extensions are expected. Every matched filename must satisfy this rule for it to succeed. Other file extensions will cause the criteria to fail.
The Filename Pattern rule allows you to configure a Regular Expression (regex) pattern which all received file names must match. This allows you to specify a granular file name pattern that needs to be matched for the rule to succeed. A regex tester is provided so that you can test and validate your regex pattern. For example, to match file names that start with "Acme" followed by an underscore then an 8 figure date (YYYYmmdd), you can specify a regex pattern of ^Acme_\d{8}.
The Forbidden Files rule is a glob pattern for filenames that must not appear in the matched set, such as *.tmp or *.partial. If any of these forbidden files are present then the criteria will fail. This rule only succeeds if the listed glob patterns are not found.
The Required Files rule allows you to specify additional criteria to determine if a particular file, or subset of files, exists among the delivered files. For each required file, you can specify criteria for file name, file count, file extension, and file size. This allows you to define granular rules where a delivery of multiple files must also include specific files among them. For example, this can be used when an expected batch delivery of multiple XML files must also be accompanied by a single manifest CSV file.
Expectation Trigger
The trigger controls how each evaluation window opens. Files.com supports multiple triggers: scheduled, interval, manual, and upload-triggered.
Custom Schedule
Custom Schedule allows you to specify custom days of the week for an Expectation.
You can choose specific Days of the Week and enter a Time of Day as the due time for those days.
Schedules run based on the selected time zone. Selecting a Holiday Region will cause the Expectation to be skipped during national holidays of the selected region.
Interval
Interval triggers run on a recurring cadence such as daily, weekly, monthly, quarterly, and yearly schedules. This is used for Expectations which need to run once per period. For example, every 15th of the month.
You can choose an interval (daily, weekly, monthly, quarterly, and yearly), the targeted day for the selected interval, and a Time of Day as the due time.
Intervals run based on the selected time zone. Selecting a Holiday Region will cause the Expectation to be skipped during national holidays of the selected region.
Upload
Upload-triggered windows open when the first matching file upload is detected.
The window stays open until uploads matching your scope have been quiet for the configured Inactivity Interval. There is no deadline for this trigger, so results cannot be late. This trigger suits Expectations driven by upload bursts rather than a clock.
Manual
The Manual trigger allows the Expectation to be started manually on an ad-hoc basis using the Evaluate now option of the Expectation. Our API and SDKs can also be used to trigger Manual type Expectations.
Delivery Windows
Delivery Window specifies the duration prior to the due time that files are expected to arrive in. Files that were delivered before this duration are ignored when the Expectation is evaluated. The maximum length of a delivery window is 14 days.
The optional Late Window determines whether expected files are delivered after the expected due time. Files delivered during the late window will cause the Expectation to be marked as "Late" rather than "Missed".
The optional Inactivity Interval specifies a time interval to wait for in-transit file uploads to complete whenever active file uploads are occurring during the due time. This option allows you to provide a grace period for in-transit files to complete their upload whenever the due time occurs while files are still being uploaded.
Max Open Interval sets a maximum duration for the delivery window. When this duration is reached, the delivery window will be closed and the Expectation will be evaluated. This option is only available for Upload and Manual triggers.
Scope
The scope defines which files Files.com considers when evaluating your Expectation.
The Path field specifies the folder to watch and you can select whether only this folder is watched or whether subfolders should be included too. The path supports globs and exclusively refers to folders, not files.
Target Pattern specifies a file glob pattern for matching files within folders, such as *.csv.
The optional Exclude Pattern specifies a file glob pattern for files that will be ignored, such as *.tmp.
The combination of the path, target pattern, and exclude pattern, identifies which files the Expectation will target for evaluation.
If your path glob matches multiple folders, Files.com treats all matched files as a single candidate set. It does not create separate evaluation windows per folder. If you need independent evaluations for separate partners or customers, create one Expectation per scope.
Get The File Orchestration Platform Today
4,000+ organizations trust Files.com for mission-critical file operations. Start your free trial now and build your first flow in 60 seconds.
No credit card required • 7-day free trial • Setup in minutes