How to notify customers before a contract is expiring?
Last Update: December 30, 2018
Apply for: SPARK Workflow for SharePoint 2013/2016 and Office 365
Suppose you have a list named "Customer Contracts" and you want to monitor the expiration date of the contracts and notify the customers by email before 7 days the expiration date is due.
There are two methods to implement the above scenario:
- Method #1: Create a list workflow that will start when a new item is created or updated.
- Method #2: Create a centralized workflow that will start on a predefined schedule.
Here are the steps on how to implement the two methods.
Method #1:
- Create a new list workflow. For more details on how to create a list workflow, refer to
Create a list workflow use case.
- Drag "For Each", "If Condition" and "Notification" activities onto the workflow canvas and drop it onto a design node
as follows:
- Configure "Delay Until" activity as follows:
- Configure "Notify Customers" activity as follows:
Method #2:
- Create a new site workflow. For more details on how to create a site workflow, refer to
Create a site workflow use case.
- Drag "For Each", "If Condition" and "Notification" activities onto the workflow canvas and drop it onto a design node
as follows:
- Configure "For Each" activity as follows:
The above CAML query will return all contracts that will expire within 7 days from the current date.
Note: A workflow variables named "varContractExpirationDate" of type DateTime and "varCustomerEmail" of type Text should be created to store the values of contract expiration date and customer email when looping through each value in the for each. - Configure "If Condition" activity as follows:
Set the Where condition as follows:
Note: The "If Condition" activity notifies only customers that their contracts will expire in 7 days. - Configure "Notification" activity as follows:
- Publish the workflow by clicking on the
Publish button in the workflow ribbon.
- In the
Settings Icon
, click on
SPARK Workflow Scheduler then click on
Add Schedule button when you finish.