---
schema_version: "1"
id: 4ae33f70c76c5131f242a8b4589a3c125b890f67de8b77c5565507b8230b2fdd
title: Use Workflow for Salesforce Sites
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/sites_workflow.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.sites_workflow.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 43df771cdf651ea0f18d761eb3694fc96218fe68bc4046f15fcb412b6b10a951
description: With workflow for sites, you can create workflow rules that trigger email alerts when certain site-related criteria are met. For example, create a rule that sends your site administrator an email alert when bandwidth usage reaches 80% of the daily bandwidth limit or when a site's status changes from the active state.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Use Workflow for Salesforce Sites

With workflow for sites, you can create workflow rules that trigger email alerts when certain site-related criteria are met. For example, create a rule that sends your site administrator an email alert when bandwidth usage reaches 80% of the daily bandwidth limit or when a site's status changes from the active state.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience and Salesforce Classic</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d205891e72">User
              Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d205891e72 ">To create or change workflow rules:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d205891e72 ">Customize Application</td>

          </tr>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d205891e72 ">To create and edit Salesforce Sites:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d205891e72 ">Customize Application</td>

          </tr>
        </tbody>
      </table>

Site usage workflow rules can help you keep your sites from exceeding rolling 24-hour limits for bandwidth and service request time, and monthly limits for page views and logins. Workflow rules on the Site object are evaluated every hour for all sites within the organization, unless your criteria is limited to certain sites. Workflow rules that are created on the Organization and User License objects are evaluated every three hours.

Only email alert actions are supported for site usage workflow rules. Other workflow actions, such as field updates, tasks, and outbound messages, aren’t available.

1. Optionally, create custom email templates using Site merge fields.
    1. From Setup, in the Quick Find Box, enter Email Templates, and then select **Email Templates**.
    2. Click **New Template**.
    3. To use Site merge fields in your template, in the Available Merge Fields section, select **Site Fields** in the Select Field Type dropdown list .
2. [Create a workflow rule](https://help.salesforce.com/s/articleView?id=platform.workflow_rules_new.htm&type=5&language=en_US) for one of these objects.
    
    1. For monthly site page views allowed and monthly site page views used fields, select **Organization**.
    2. For site detail, daily bandwidth and request time, monthly page views allowed, and other fields, select **Site**.
    3. For the monthly logins allowed and monthly logins used fields, select **User License**.
    
    The Organization and Site objects are only available if Salesforce Sites is enabled for your organization. The User License object isn't dependent on sites, and is only available if you have Customer Portals or partner portals enabled for your organization.
3. For the evaluation criteria, select one of these options.
    - To specify the filter criteria that a site must meet to trigger the rule, select **criteria are met**.
        
        For example, to trigger the rule every time the active status changes for a site, set the filter to Site Status not equal to Active. To add more rows or to set up Boolean conditions, click **Add Filter Logic**.
    - To enter a formula, select **formula evaluates to true**.
        
        For example, this formula triggers the rule when bandwidth usage reaches 80 percent of the daily bandwidth limit.
        
        ```
        DailyBandwidthUsed >= 0.8 * DailyBandwidthLimit
        ```
        
        In this example, the formula triggers the rule when time usage reaches 80 percent of the daily time limit.
        
        ```
        DailyRequestTimeUsed >= 0.8* DailyRequestTimeLimit
        ```
4. Add an [email alert action](https://help.salesforce.com/s/articleView?id=platform.customize_wfalerts.htm&type=5&language=en_US) as an automated action on your workflow rule.

#### See Also

- [Salesforce Sites](https://help.salesforce.com/s/articleView?id=platform.sites_overview.htm&release=264.0.0&type=5 "Salesforce Sites enables you to create public websites and applications that are directly integrated with your Salesforce organization—without requiring users to log in with a username and password. You can publicly expose any information stored in your organization through a branded URL of your choice. And you can make the site's pages match the look and feel of your company’s brand.")