Worfklow sends out a notification based on expiration dates

by Larry Bates. » Wed Nov 12, 2014 3:58 pm

Hello,
I am looking to create a workflow in SharePoint online that will email out notifications to users 90, 60 and 30 days prior to a contracts expiration?
The contracts are in a document library and the user uploading the document will enter the expiration date and who needs to be notified (via their email) the workflow will then pause until 90 days and send the first notification to the user, then pause again till 60 days and send a second notification and then pause again until 30 days prior to the expiration date and send the final notice to the end user. Can the “Workflow Actions Pack for Office 365″ perform these tasks?
Larry Bates.
 

by Roman Rylov » Wed Nov 12, 2014 3:59 pm

Hello Larry,
I would like to offer to make some changes in your algorithm. I suppose better solution will consist of one site-level workflow, this workflow will select items by CAML for 30, 60 and 90 days, iterate through items in loop and send notifications to users.
You can use other our product Workflow Scheduler to schedule the workflow to start once a day.
For example your CAML query for documents created 30 days ago could be look like this:

Code: Select all
<View>
 <Query>
    <Where>
       <Eq>
          <FieldRef Name="Created"/>
          <Value Type="DateTime">
             <Today Offset="-30"/>
          </Value>
      </Eq>
    </Where>
 </Query>
 <ViewFields>
    <FieldRef Name="UserName"/>
 </ViewFields>
</View>


Thus, the workflow will run each day and query only documents for notifications and process them. You can create similar queries for 60 and 90 days and there is no need to create list level workflow, just site level workflow and schedule it.
User avatar
Roman Rylov
 
Posts: 330
Joined: Tue Nov 11, 2014 6:25 pm


Return to Workflow Actions Pack for Office 365