Sampling filters
Feedback > Surveying > Sampling > Filters
Filters, or Sampling filters, determine which Invitation emails are included or excluded during the Sampling process based on business rules. Records that pass filtering proceed to the Quarantines stage of sampling.
Experience Cloud may multiple sampling filters, which they execute in priority order. A record excluded by any filter is permanently excluded, regardless of other filters. Without any Sampling filters, all records pass through this stage.
Creating a sampling filter
- On the Filters screen, click New.
- Provide a name, and optionally assign the Priority and Description.
- Save the filter.
- Enter the Survey Condition and choose the Action (exclude or include).
- Save the filter.
Sampling filter properties
- Kind
- The type of filter. The only type available is Survey Condition, which filters survey records.
- Name
- Name of the filter, and is the label used in sampling reports.
- Priority
-
Determines the evaluation order of the Sample Filters. Filters with a lower priority number are applied first.
Tip: All active filters have a priority. To inactivate a filter, delete the Priority value and leave the field blank. - Description
- Documentation describing the filter.
- File Based Sampling Only
-
Important: This property is obsolete and has no effect.
Whether or not the filter is used in pool-based sampling, which is a deprecated feature.
- Survey Condition
- Conditional expression referencing one or more E-Fields and which identifies the record as being affected by the filter. For example, to exclude all records from Germany, the condition is
e_country = 'de', and the Action is Exclude all matches. To include only records from Germany, use the same condition and set the Action to Include all matches. - Action if match
-
Action to take when Survey Condition matches a record.
- Exclude all matches — Rejects records that meet the condition.
- Include all matches — Accepts only records the meet the condition.
Note that other filters might reject a record that passed this action.
- Test Survey IDs
- One or more existing survey record IDs to test against the filter and determine if they would pass the Condition and Action. Enter one or more IDs (comma separated) and click Save to see the results of the test. Records that would pass to the the Quarantine stage are labeled "Sampled", which records rejected by the filter are labeled "Not Sampled".
Tips and best practices
Set sample filters to exclude only. Do not mix includes and excludes.
When using pool-based sampling, create a sampler that has a staleness filter to prevent sampling of old records.
Use K-fields for complex expression conditions, and then test for the field's result/value in the filter. For example, this field returns 1 when the Email field value ends with either medallia.com or example.com; otherwise the field value is 2. The filter condition can then test for 1 or 2 depending on the desired result.
f = function() {
// Define email with e_email
var email = e_email;
// Prepare regular expression to check for emails ending in medallia.com or example.com
var regex = /@(medallia|example).com$/gi;
// Test regex and return 'Yes' if regex matches, else return 'No'.
if (regex.test(email) == true) {
return 1;
} else {
return 2;
}
};
f();
