Rock Workflow - Weekly Reminders Using the Delay Action

  • By Derek Mangrum 2 Years Ago

We recently added a workflow to our system to help manage inquiries at our Starting Point, a place for new people to get their questions answered. Specifically, this workflow is triggered by a Connection Request for our Discovering Christ classes for people who want to advance their faith and/or be baptized.

This workflow performs a simple, but important function. It notifies the Connector Group in charge of the particular Connection Request that a new request has been generated. Then, it reminds the Connector Group each Friday that the request is still active (if it is still active). The technical issue we needed to solve was how to create this 'weekly reminder'.

Hopefully this will be helpful to you as you encounter a similar need. Also, I would love to hear your thoughts on this and would be interested in any improvements you might have. So, comment below! With that, let's have a look.
Workflow Outline

The first activity simply sends an email to our Connectors Group to let them know a connection request has been made and they now have someone to follow up with. Most of those 'Set...' Actions are just setting Workflow Attributes, using Lava and the passed-in 'Entity' (which is the triggering Connection Request being made) as needed. This is true, with one exception... the 'Set First Connector Group' Action. This had to be grabbed using the following SQL:

SELECT TOP 1 item.[Guid]  
    SELECT TOP 1 cGroup.[Guid]
        SELECT TOP 1 G.[Guid]
        FROM [ConnectionOpportunityConnectorGroup] COCG
        INNER JOIN [Group] G ON G.[Id] = COCG.[ConnectorGroupId]
        INNER JOIN [ConnectionOpportunity] CO ON CO.[Id] = COCG.ConnectionOpportunityId
        INNER JOIN [ConnectionRequest] CR ON CR.[ConnectionOpportunityId] = CO.[Id]
        WHERE (
        -- find the connector group that matches the request
        CR.[CampusId] = COCG.[CampusId]
        -- or find the connector group that has no campus (all campus)
        OR COCG.[CampusId] IS NULL)
        AND CR.[Id] = {{ Workflow.ConnectionRequestId }}
        -- ordered to include the All Campus (NULL) after any campus specific match
        ORDER BY COCG.CampusId DESC
    ) cGroup
    -- the Global Connector group is the last (the real last) resort.
) item


Once the email is sent, the workflow enters its 'Daily Loop' Activity.

This Activity loops until the Requester actually gets connected. It waits a day, then checks to connection state and completes the connection request if the person is connected. It the person is not connected, we get the current day of the week and then send a reminder email if it is Friday (using a filter on the Send Email Action). We then have the Activity re-start itself.

This has proved to work well. As it turns out, automated nagging helps keep things moving along!

Central Christian Church (AZ)
Mesa, AZ

I'm the Network and Server Technician at Central Christian Church (AZ) and when I'm not doing those things I write Rock Workflows!