Documentation

Spigots have several components which define when the spigot will run, on which records, and taking which actions.

Spigot
Spigot Schedule
Spigot Schedule
Schedules
Inputs
Modifiers
Spigot Action
Spigot Action
Actions

The components of the Spigots App are:

  • App Configurations
  • Spigots
  • Schedules
  • Inputs
  • Modifiers
  • Actions
  • Assignments
  • Logs

App Configurations

App Configurations are the highest level of control for a group of Spigots that run together. Each active App Configuration has a scheduled job that kicks off a batch job to run all qualifying Spigots related to that App Configuration. The User that actives the App Configuration becomes the running user of each Spigot, meaning that User’s permissions and record level sharing apply to those spigots.

Fields on App Configuration (Spigot_App_Configuration__c)

Common Patterns

  • Most setups probably just need one App Configuration running every ~60 seconds. ‘Seconds Between Runs’ can be safely set as low as 15.
  • If your primary App Configuration is getting bogged down with long running spigots, you may want to create a separate one with just a few light-weight jobs that need to run at a high frequency
  • If you have certain Spigots that should run with different permissions or record visibility, you can active a secondary App Configuration as a user with these modified permissions assigned

Schedules

Schedules can be of Type ‘enabling’ or ‘disabling’. A Spigot will run if the following is true:

  • The Spigot’s App Configuration Scheduled job kicks off a batch job
  • It has been more than ‘Seconds Between Runs’ since the Spigot last ran
  • The Spigot has at least one enabling schedule that is running
  • The Spigot does not have any disabling schedule that is running

Fields on Schedule (Spigot_Schedule__c):

Configuration:

  • Spigot Schedule Name (Name, Text, 80 Chars) — a meaningful label describing the Schedule
  • Description (Description__c, Text, 255 chars) — more info on the purpose of this Schedule
  • Type (Type__c, Picklist)
    • Enabling – when schedule is running, enables Spigots to run
    • Disabling – when schedule is running, disables Spigots from running
  • Start Time (Start_Time__c, Time) — UTC Time to start the schedule daily
  • End Time (End_Time__c, Time) — UTC Time to end the schedule daily
    • If End Time is before Start Time, the Schedule will run over midnight UTC
  • Months (Months__c, Multi-Select Picklist) — the Months of the year this Schedule should be running
  • Deactivating Days (Deactivating_Days__c, Text, 255 chars) — a ‘;’ separated list of YYYY-MM-DD formatted dates to stop running this Schedule, even if it would be running from Days of Week, Days of Month, or Months
  • Activating Days (Activating_Days__c, Text, 255 chars) — a ‘;’ separated list of YYYY-MM-DD formatted dates to running this Schedule, even if it wouldn’t be running from Days of Week, Days of Month, or Months
  • Days of Week (Days_Of_Week__c, Multi-Select Picklist) — the Days of the week this Schedule should be running
  • Days of Month (Days_Of_Month__c, Multi-Select Picklist) — the Days of the month this Schedule should be running

Calculated

  • Is Running (Is_Running__c, Boolean Formula) — true if this Schedule is currently running, false otherwise

Common Patterns:

  • Always Running — an enabling Schedule that is always running
  • After Hours — an enabling Schedule that runs while most users are not using Salesforce (evenings, mornings, weekends)
  • Holidays — a disabling Schedule that prevents lead assignment and similar things from running on Company holidays

Inputs

Modifiers

Actions

Assignments

Logs


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *