Data Policy
From LongJump Support Wiki
Contents |
About Data Policies
Two types of Activation Policies are available: Action Based and Calendar Based.
Data Policies are activated (by a trigger) to automatically take an action on a record if some conditions are met (criteria).
- Activation Trigger
- Initiates the policy to check if a record meets the criteria
- Criteria
- When record information meets the criteria, the data policy is executed and invokes specific action(s)
Action Based Data Policies
- Are invoked by any of the following selected Triggers
- Can be invoked before or after the record is applied to the database
- Examples of action-based policies
- In a sales department, the local sales representative automatically receives an email notification when a prospective client requests information from the organization's web site. The data policy is triggered by the addition of a new record (prospect), choosing the email recipient based on the territory.
- In a manufacturing operation, the parts department wants to know if the inventory on a popular part is low. The data policy is triggered by an update to the quantity of units in inventory.
- When adding new records, validate the address/phone/email fields before allowing the records to be added to the database
- When importing records (leads file from a tradeshow, for example), verify that the record is not a duplicate of any already existing person/company
In this Action Based data policy, the following elements are defined:
|
Calendar Based Data Policies
Calendar based data policy actions are triggered on a schedule, defined by the following parameters:
- Start Date and Time
- Non Repeating or Repeating (Daily, Weekly, Monthly, Yearly)
- End Date or Never-ending
- Considerations
- Calendar Based Data Policies are submitted for processing at the time you request. However, processing time of the actions depend on the current system load, so actual time of execution may be delayed. Please schedule actions well in advance of your need.
- Examples of calendar-based policies
- Drip Campaigns use Calendar-based data policies. These policies detect values and conditions of the data fields and based on them, execute a combination of actions including: sending an email, assigning a task, updating the record content, delivering a SOAP message to an external system, or running Java code.
- In a front-desk reservation system, set the criteria to verify that the check-in date must be in the future (after Today) and that the check-out date follows the check-in date
- In a doggy daycare system, check that the pet owner's account has enough pre-paid credits for that week's care
In this Calendar Based data policy, the following elements are defined:
|
About Policy Triggering Criteria
When a data policy is triggered, the Policy Triggering Criteria is tested.
Considerations
- Policy Triggering Criteria is an Expression, which must resolve to TRUE or FALSE
- If the Expression described by the criteria is FALSE, the associated actions are not applied. If TRUE, the Data Policy is executed, and any associated Actions are invoked.
- Policy triggering criteria can be empty/blank, in which case the criteria resolves to TRUE
- Calendar Policies have additional, date-based Triggering Criteria available
Triggering Criteria in Action Based Data Policies
In these action-based criteria expressions examples, note that the Field Display Type and Formula Function are used together to create a Logical result for the Policy Triggering Criteria.
These examples are presented as questions, because the result must be Logical: YES/NO or TRUE/FALSE.
| Example | Expression |
|---|---|
| Is the submitted date more than seven days before the departure date? |
|
| Is the inventory count less than 25? |
|
| Is an essential field blank? |
|
Available Triggers and Eligible Objects
This list describes the available triggers, and eligible objects:
- Note: Data policies can be created for all objects, except Products and Price Books
Triggering Criteria in Calendar Based Data Policies
Calendar Based Data Policies offer an additional, date-based criteria, as well as field-based policy triggering criteria.
- Learn more: Filter Expressions
About Actions
- When a data policy meets the specified Policy Triggering Criteria, the actions associated with the policy are invoked
- Multiple actions can be added to a data policy
- Several action types are provided, and they can be invoked in any order (or reordered as needed)
- In a Calendar Based Data Policy, all of the following actions are available
- In an Action Based Data Policy, the Activation Sequence determines which actions are available
Actions Description Activation Sequence Before Triggering Actions (Pre)
Activation Sequence After Triggering Actions (Post)
Create Task Create a task and assign it to selected users (Record Owner, Supervisor of Record Owner, Specific User, System Administration) -- Yes Send Email Send an email message based on roles; optionally, send the message to an individual email address -- Yes Change Record Owner Change the record owner, reassigning the record and effectively managing data flow -- Yes Update Record Update the record; change the value of any field, using any formula you define -- Yes Send Outbound Message With this data policy action, REST messages can be sent to a valid end point -- Yes Execute Java Code Execute a custom action by writing Java code and making calls to the Java API Yes --
Add a Data Policy
- Click Setup | Customize | Objects | <object name>
- Click the Data Policies tab
- Click the [Add Policy] button
- Enter the following information:
- Name
- Policy name
- Enabled
- Check the Enabled checkbox
icon to enable the policy
- Select the Activation Trigger:
Follow the instructions in the following sections to build Action or Calendar Based Data Policies:
Build an Action Based Data Policy
Complete the steps at Add a Data Policy.
- In the Policy Information section, complete the following information:
- Activation Sequence
- Select whether to invoke the policy before or after the triggering actions
- Before Triggering Actions
- Use this sequence to validate data before committing it to the database; For example, to check for and prevent the addition of duplicate records, or to verify that an essential field is not empty (blank)
- After Triggering Actions
- Use this sequence to take some action based on the data in the record
- Triggering Actions
- Choose to invoke the data policy when any of these activities are applied to a record in the current object
- Learn more: Available Triggers and Eligible Objects
-
- Add activates the policy when a record is added
- Update activates the policy when a record is updated
- Delete activates the policy when a record is deleted
- Ownership Change activates the policy when a record changes ownership (not available in Tasks/Appointments)
- Workflow State Change activates the policy when the workflow state changes
- Import Batch activates the policy during a batch import
- Import Record activates the policy when a record is imported
- Merge activates the policy when the Merge option is selected while Converting Prospect to Accounts
- Convert to Account activates the policy when converting Prospect to Accounts
- When Due activates the policy when a Task or Appointment becomes due (on End Date) (only available in Tasks/Appointments)
- On View activates the policy when a record is viewed
- Optionally, in the Policy Triggering Criteria section, complete the following information:
- Enter additional field-level checks in Policy Triggering Criteria
- Learn more: Formula Expressions
- Note: When building a Function, click the [Check Syntax] button to validate the expression; Remember that Policy Triggering Criteria expressions must resolve to a Logical type
- Click the [Save] button to save the policy
Build a Calendar Based Data Policy
Complete the steps at Add a Data Policy.
- In the Policy Information section, complete the following information:
- Activation Date
- The date when to start the actions
- Activation Time
- The time when to start the actions
- Repeating Frequency
- Whether the actions repeat at an interval
- End Date
- The date when to stop invoking the actions
- Run As
- Executes an action using the permissions of the specified User, (not the User initiating the action); Choose the Name of a User with the required Role Based Access Permissions
- Optionally, in the Date Fields Criteria section, complete the following information:
- Date Fields Criteria
-
- Select a field from one of the following fields (Date Created/Date Modified/Workflow Date Change), then select an operator from the list (a range of dates)
- Optionally, add an additional date criteria
- Optionally, in the Advanced Fields Criteria section, complete the following information:
- Advanced Fields Criteria
- Additional data fields are available to create Filter Expressions
- Select a field from the list, choose an operator and a value:
- Optionally, in the Advanced SQL Writer section, complete the following information:
- Advanced SQL Writer
- Enter MySQL functions that refer to the object's fields. MySQL functions that refer to the object's fields that the platform uses in the WHERE clause of a SELECT statement
- Learn more: Drip Campaign Advanced SQL Example and MySQL
- Example SQL code
- Click the [Save] button to save the policy
Add Actions to a Data Policy
Add actions that are invoked when the Data Policy is executed.
- Click Setup | Customize | Objects | <object name>
- Click the Data Policies tab
- Click the [New Policy] button to add a new policy, or click the name of an existing Data Policy
- Click the [New Action] button to add a new action
- Select the action to execute:
-
- Create Task
- To create a task, complete the following fields:
- Action Name
- Name of the action
- Assigned To
- Select one of the following:
- Record Owner
- Supervisor of Record Owner
- Specific User
- System Administrator
- Subject
- Subject of the Task
- Days from trigger for when task is due
- Automatically make this task due for a specified number of days after the policy is triggered; '0' will use the Trigger Date as the Due Date
- Description
- Task description
- Send Email
- To send an email message, complete the following fields:
- From
- Sender, choose from: Record Owner, Record Owner Supervisor, or a Specific User (opens a lookup window to Users)
- To
- Recipent(s), choose from: Record Owner, Record Owner Supervisor, Specific Email Addresses (opens a lookup window to Users and Contacts), System Administrator, Primary Contact, or other Related to options
- Cc
- Email address of person(s) who should be copied
- Bcc
- Email address of person(s) who should be blind-copied (these email addresses are hidden from all recipients, and is visible only to the sender)
- Subject
- Subject of the email message
- Editor Type
- Select a type of editor
- Learn More: Send Email
- Description
- Description of the message
- Change Record Owner
- Assign the record to a new owner
- Update Record
- Change a field in the record (status, date, description, etc.)
- Execute Java Code
- Enter the Java code you want to execute. Click the [Choose Function] button to select a available functions; See Java API for more information
-
- Click the [Save] button to save your changes, or [Cancel] to stop the action
- Optionally, add additional actions, or [Reorder] the actions
Edit a Data Policy
- Click Setup | Customize | Objects | <object name>
- Click the Data Policies tab
- Click the Data Policy Name link
- Click the [Edit] button
- Make changes to the fields
- Click the [Save] button
Edit an Action
- Click Setup | Customize | Objects | <object name>
- Click the Data Policies tab
- Click the Data Policy Name link
- Click the Action Name link
- Click the [Edit] button
Reorder Actions
- Click Setup | Customize | Objects | <object name>
- Click the Data Policies tab
- Click the Data Policy Name link
- Click the [Reorder Actions] button
- Select an action in the list and click the up or down arrow buttons
- Click the [Save] button
Delete an Action
- Click Setup | Customize | Objects | <object name>
- Click the Data Policies tab
- Click the Data Policy Name link
- Click the Action Name link
- Click the [Delete] button
Delete a Data Policy
- Click Setup | Customize | Objects | <object name>
- Click the Data Policies tab
- Click the Data Policy Name link
- Click the [Delete] button
About Data Policies in Workflows
When a record is processed through a Workflow, it is associated with a workflow state, or condition. If that workflow state contains a data policy, the data policy is executed on the record. This combination of workflow plus data policy will automate record processing for Actions in the platform (actions appear as [Buttons] in a record).
Data Policies can be used with Workflows for two purposes:
- Calendar Based Data Policies
- Can be created to automatically to trigger a record into a new workflow or move the record into a different state if it already exists in a workflow
- Usage Examples:
- If a request is waiting in IT Manager inbox for more than three days, send a reminder email
- This is identified using Last Workflow State Change Date field, which is available in every object
- If a request is waiting in Supervisor inbox for more than two days, use Java API to move the request to the IT Manager inbox
- Action Based Data Policies
- Designed to be triggered on a Workflow State Change action, and can be linked with any state in a Workflow
- When a record arrives in a state that has data policy linked to it, that policy is executed
- Usage Examples:
- Send additional email notifications when record arrives in certain state
- Throw errors if some specific requirements are not met
About Data Policies in Tasks and Appointments
Data policies can be added to Tasks and Appointments to trigger these actions:
- Send Email
- Update Records
- Execute Java Code
Data policies in Tasks and Appointments are triggered when the Task or Appointment is due. Learn more:
