Code Monkey home page Code Monkey logo

zhouhu / sfdx-mass-action-scheduler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sfdx-mass-action-scheduler/sfdx-mass-action-scheduler

0.0 1.0 0.0 16.39 MB

๐Ÿš€ Declaratively schedule Process Builder, Flows, Quick Actions, Email Alerts, Workflow Rules, and Apex to process records from Reports and List Views.

Home Page: https://douglascayers-org.github.io/sfdx-mass-action-scheduler/

License: BSD 3-Clause "New" or "Revised" License

HTML 0.06% JavaScript 87.31% CSS 0.19% Apex 12.28% TeX 0.16%

sfdx-mass-action-scheduler's Introduction

Mass Action Scheduler

screen shot

Overview

Declaratively schedule Process Builder, Flows, Quick Actions, Email Alerts, Workflow Rules, and Apex to process records from Reports, List Views, and SOQL queries.

  • Declarative - no code necessary, never write Batch Apex again for queries that can be expressed in a report or list view and actions that can be expressed in a declarative alternative
  • On Platform - everything happens in Salesforce so no exporting or uploading data
  • Timely - run actions manually or schedule hourly, daily, weekly, or any time in between

Inspired by Marie Chandra's idea Ability to Schedule when Process Builder Triggers.

Inspired by Narender Singh's idea Ability to schedule flows, workflows and processes in process builder.

No more waiting for records to be updated or creating clever workarounds to cause records to be updated to cause these actions to fire.

Documentation and Discussion

Data Sources

Identify the records you want to process with list views, tabular reports, SOQL queries, or Apex iterables.

Data Sources When to Use
List Views Simple filters. For up to 50 million records.
Reports Complex filters like Cross Filters. For up to ~10 thousand records.
SOQL You know exactly what you want to query and don't want to create a list view or report. For up to 50 million records.
Apex Bring your own class that implements Iterable<Map<String, Object>> if your data is derived from multiple queries or you need to make http callouts to external web services or other custom logic. For up to 50 million records.

Actions

Almost any process automation you configure can be scheduled.

Actions Supported Types
Process Builder Processes that start when invoked by another process
Flows Auto-launched flows (no screens). Any that can be called from Process Builder
Quick Actions Create a Record, Update a Record, and Log a Call types
Email Alerts All
Workflow Rules Active rules
Apex Classes annotated with @InvocableMethod

Scheduling

Flexible options for scheduling when a configuration runs.

Scheduling Options When to Use
Manual Run on-demand from UI via button
Automated Run a configuration from Process Builder, Flow, or Apex
Simple Schedule Easily pick the hours, days, and months to run repeatedly
Advanced Schedule Custom scheduling needs that require a cron expression

What you can do with Mass Action Scheduler

I'm sure you will think of all kinds of ideas how you can use this app. Here are a few ideas:

  • Run a process monthly, maybe to create a record or callout to an external system
  • Regularly call out to an external system to obtain data to process in Salesforce
  • Run data correction actions daily, such as updating or deleting records
  • Automatically add leads and contacts to campaigns based on report or list view criteria
  • Send emails on a periodic basis
  • Create "infinite" flows that continuously loop on a schedule
  • Perform field updates without exporting or importing data

For walkthroughs please check out the examples in the wiki.

Pre-Requisites

There are a few items you need to setup before installing and using this app.

  1. You will need to Enable Lightning Experience because we are using Lightning Components.
  2. You will need to Enable My Domain because we are using Lightning Components.
  3. You will need to Disable clickjack protection for Visualforce pages because we iframe pages in Lightning Components.

Please see the instructions in the wiki for screen shots and step-by-steps.

Packaged Release History

Support

Mass Action Scheduler is an open source project. It's an independent project with its ongoing development happening in the evenings and weekends. Maintaining and developing new features takes a considerable amount of time. If your business has found value in my projects, please consider showing your support by contributing to my virtual tip jar on PayPal. Thank you! โค๏ธ

Release 2.1 (current)

Due to Lightning Experience web page caching, please log out and log back in after installing the package for UI changes to appear.


Installing the Source Code (Developers)

This repository is organized using Salesforce DX. You may install the source code from GitHub and make any desired adjustments. You are responsible for ensuring unit tests meet your org's validation rules and other requirements.

First, clone the repository.

git clone https://github.com/douglascayers-org/sfdx-mass-action-scheduler.git

Change directory into the project folder.

cd sfdx-mass-action-scheduler

Create a new scratch org.

sfdx force:org:create -a mas -s -f config/project-scratch-def.json

Push the source metadata into your scratch org.

sfdx force:source:push

Assign the permission set to your user.

sfdx force:user:permset:assign -n Mass_Action_Admin

Create a test account, only required for the report tests.

sfdx force:data:record:create --sobjecttype Account --values "Name='dca_mass_action: MA Test Account'"

Run unit tests.

sfdx force:apex:test:run --codecoverage --resultformat human --wait 10

Open the scratch org and enjoy!

sfdx force:org:open --path //lightning/o/Mass_Action_Configuration__c/list

Credits

Doug Ayers develops and maintains the project.

Appiphony for developing the Strike Wizard component based on Lightning Design System Path blueprint.

Salesforce Foundation for developing tools for querying Salesforce Reports API in Apex.

Shinichi Tomita for developing jsforce and soql-parse libraries for easy use of Salesforce REST APIs in JavaScript.

jQuery for developing jQuery library.

License

The source code is licensed under the BSD 3-Clause License

sfdx-mass-action-scheduler's People

Contributors

douglascayers avatar

Watchers

Zhou Hu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.