Samplers
Feedback > Surveying > Sampling > Samplers
Samplers define settings to be used by Sampling (as such, it is also called Sampler Settings). A Sampler is required for:
- Quotas — A quota rule is associated with a Sampler, and a Sampler can have multiple quotas. Further, to employ the quota rule(s) during sampling, the Auto Importer Processor must reference the Sampler in
<survey-processor-options samplingSetting>. - Pool-based sampling — The Sampler identifies episode records to sample based on Episode conditions, and identifies the operation to perform on the records that pass sampling.
A Sampler is not required for Sampling filters, Opt-out, or Quarantine processing, as those stages happen automatically when configurations exist for them.
Creating a Sampler
- On the Samplers screen, click New Sampling Settings:
- Define the Name and Priority.
- Leave Post Sampling Operation as Push to survey engine, then generate invites.
- Click Save.
- For Pool-based sampling, define are least one Episode Condition for the Staleness filter. See Staleness filter for details.
Sampling Settings properties
The Samplers screen defines Samplers, Episode conditions, and the Episode selectors that qualify the conditions.
- Name
- Name of the Sampler.
- Membership Model
- (Display only) Whether or not the company uses a Membership Model for sampling. This functionality is obsolete.
- Sampling Report Email
- Comma-separated list of email addresses to receive the sampling report after each sampling run.
To identify which Sampler was used, include the
$SAMPLING_SETTINGS$variable in the subject or body of the email. - Quota Management Report Email
- Comma-separated list of email addresses to receive the quota report after each Quota rule runs.
- Post Sampling Operation
- Operation to perform on records that pass sampling.
Push to Survey engine, then generate invites Sends invitations to records that pass sampling. Sets the record's Survey status (e_status) to READY_FOR_SE.
Push to Survey engine, do no generate invites No invitation is sent, but the survey can be taken. Use this when an external system sends the invitations. Sets the record's Survey Status to READY_FOR_SE_ONLY.
Do not push to Survey engine Creates a record but not a survey; only applicable when using the Web reporting feature of Invite. Sets the record's Survey Status to NO_SURVEY_ENGINE. Use this only when the upload facility is used and feed data is exported.
- Priority
- Priority setting for this Sampler; lower values run before higher values.
Episode Conditions properties
- Name
- Name of the Episode Condition.
- Company
- Name of the company the condition is for.
- Active
- Whether or not the Episode Condition is active: is tested when the Sampler runs.
- Match Any
- Whether or not the episode record passes if any of the Episode Selectors match (OR). When unselected, all conditions must match (AND) for the record to pass sampling.
Episode selectors properties
Episode selectors define the elements of the Episode condition, which can have one or more selectors.
- Name
- Name of the Episode selector.
- Field
- Survey record field used for the condition test. Only Fields marked as Used for Episode Condition can be used. Warning: In this context, the Creation date (
e_creationdate) field is the timestamp when the event record was created, not the eventual survey record. - Operator
-
Comparison operation to use when matching the Value in the Field. Operators include:
- Between — Return records where the Field is between the specified Value ranges.
- Date in last interval — Return records where the Field (of Date ContentKind) is in between now and the specified interval, where now is the time sampling runs, and the specified interval is set in the Value (now minus the Value). Note that Date (not Datetime) count as of midnight.
- Date not in last interval — Return records where Field (of Date ContentKind) is not in between now and (now minus the Value), where now is the time sampling runs, and the specified interval is set in the Value (now minus the Value). Note that Date (not Datetime) count as of midnight. Tip: Date not in last interval:
Field < (now - interval). Date in last interval:Field >= (now - interval). - Equals
- Id mod equals — Returns the remainder (modulo) of the Value divided by an operator as long as the remainder is equal to another operator. This can be summarize as (
Value % Operator A) = Operator B. - Is not null
- Is null
- Length equals
- Length less than
- Length more than
- Less than
- Less than or eq
- Match regex
- Match regex case sensitive
- More than
- More than or eq
- Not equals excluding null — Return records matching the condition excluding records where the value is null.
- Not equals including null — Return all records matching the condition including records where the value is null.
- Not match regex
- Not match regex case sensitive
- Set ends with excluding null — Return records that match the ending of the value excluding records where the value is null.
- Set not ends with — Return all records except those that match the ending of the value.
-
Set not ends with including null — Return all records except those that match the ending of the value including records where the value is null.
- Set starts with — Return records that match the beginning of the value.
-
Set not start with — Return all records except those that match the beginning of the value.
-
Set not start with including null — Return all records except those that match the beginning of the value including records where the value is null.
- Set value in — Return records that match any of the specified values. For example, to export both live and UAT data, but not test data, you would use
Field= e_development_cycle,Operator= Set value inandValue= Live, UAT, which means that only records that have valuee_development_cycle = Liveore_development_cycle = UATwill be exported.Note: Set value in does not test choice set (Enum ContentKind). To test for multiple choice sets, create a Condition for each value. - Set value not in — Return all records except those that match the specified values.
- Unit in Unit group — A Unit Group selector is available to select one or more groups.
- Value
- Value to be matched per the comparison Operator.
Tips
- When there are multiple Samplers, they run in priority order, and one sampler completes before the next one begins. Further:
- If two sampling settings share the same pool of episodes, quarantine rules prevent them from being sampled twice.
- If an episode is not selected in one Sampler, it is still considered for subsequent Samplers.
- Because the sampling settings run in sequential order, prioritize more restrictive settings to run first.
- Episodes are not tagged with a sampling setting until they are selected for sampling and become surveys.
- If an episode is blocked by an Episode Selector it does not pass sampling. If an episode passes the Samplers but is blocked by Quarantine Rules, next time sampling happens the episode is checked again.
Examples
To send Invitation emails only to those email addresses ending with medallia.com:
- Field = Email Address
- Operator = Set ends with
- Value =
medallia.com
Staleness filter
A Staleness filter rejects episodes older than a specified amount of time, usually days. For example, a hospitality company might reject episodes more than 28 days old.
- Field = Checkout date
- Operator = Date in last interval
- Value =
27 days
Blocking all episodes before a date
This is useful for records that were created while developing the configuration. For example, to reject all episodes created before 5 March 2016:
- Field = Creationdate
- Operator = More than
- Value =
2016-03-05 09:00:00
Blocking all episodes associated with all Units in a group
To block all episodes from all properties in South America:
- Field = Property
- Operator = Unit in Unit Group
- Unit Group =
South America
