0

I've recently began setting up some processes with Process Builder to automate a lot of previously manual tasks (like creating a reminder to contact customers when an opportunity is won, etc.). I also started looking into triggering reminders when certain time periods are up but have run into some issues:

Use case: If a contract end date is less than 2 months from now, a mail notification should be sent out to the account owner.

The Process Builder cannot do these things it seems, and can only trigger if a record changes. I tried to do a workaround where I create a custom field for the contracts and set it to a boolean which is defined as

TODAY() + 60 > EndDate

This field correctly updates, but this doesn't seem to trigger the event as it's not a manual change.

Setting up the notification templates and mail alerts works for my other processes so my problem here is that I want to trigger a process when this field evaluates to true. My guess is some sort of daily scheduling of the process, but I couldn't find info on that either :(

2

You can use scheduled action of process builder for this. Whenever a contract is created, you trigger schedules an action to send an email 60 days before the end date.

enter image description here

Also, make sure that your end date is not null and is in future to make sure process builder execution doesn't fail. Src: https://automationchampion.com/2015/02/16/getting-started-with-process-builder-part-2-time-dependent-actions/

  • 2
    +1 but you might want to mention that the criteria itself should not compare dates; it should only check that "End Date" is in the future, or at least not null. – sfdcfox Dec 8 '18 at 12:58
  • @PranayJaiswal, this scenario will work for new records only, what if there are existing contract records? – sagar maurya Dec 8 '18 at 13:06
  • It's an idea... You can add it on created and edited as well... And add level of complexity to suit the business case. My answer was to brainstorm the possibility using process builder which to me is quite possible. – Pranay Jaiswal Dec 8 '18 at 13:25
  • Unfortunately this only works for a subset of the use case that I have. Your example only allows for adding reminders/triggers when a contract is created. Whenever a customer renews their contract the contract is edited where the end date is extended into the future, which would not trigger this event. If I select the "when a record is created or edited" the ability to delay the action is disabled. My question boils down to: is there a way to trigger processes without having a record manually edited or created? – MagneTism Dec 10 '18 at 3:05
1

@MagneTism, process builder and trigger will only be fired when there is any event. Considering your scenario(where I am assuming contract records already exist), I would suggest you to achieve this functionality using Batch Class, which will run daily(at specified time) and check for all the contracts who's end date is less than 2 month, and will send email to the account owner.

  • This definitely looks more like something I need to be looking into. I'd prefer not to have to go through the API/development route, but if that's the only way then so be it :) – MagneTism Dec 10 '18 at 3:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.