Email Processing FlowLast Updated: 07/22/2016 Introduced in Verision: 3.2
This tutorial demonstrates how to configure and use Email Processing Flow. This Flow can be set on the Assigned Form. When the Form is being assigned, assignee receives an Email notification. In Decisions, if we have Email Response Scheduled Job set and running and our Assignment Form is configured with Email Response handling, we can build our logic to analyze user’s response and notify him or her via Email with the information on why his or her Email Response was not valid and the Assignment was not completed.
In this example we are going to build a simple Flow with Assigned Form. Then, we are going to configure Email Response handling. In the Email Processing Flow we are going to check if Inline Response matches our Required Response options and if the Response contains Comments.
We start with configuring Email Response Scheduled Job. Navigate to the System > Jobs and Events > Scheduled Jobs Folder in the Portal. Then, click Add Scheduled Job on the Folder Actions Panel.
Next, we need to configure our Email Response Scheduled Job. For more instructions on how to set Email Response Scheduled Job please click here.
Our Scheduled Job shows up in the Folder…
Next, we navigate to our Designer Folder and click Create Flow on the Folder Actions Panel.
In the resulting window we Name our Flow and click Create to proceed to the Flow Designer.
Our Flow is going to contain only the Form. We add Show Form component from the Favorite Steps category.
Then, we Name our Form and click Create to proceed to the Form Designer.
In the Form Designer we build our Form for the Assignment. Mention, that we do not have to have any buttons for outcomes because we will design Action outcomes from the Form to complete the Assignment. When we finished designing our Form, we can save the Form and close Form Designer.
Back in the Flow Designer we select our Form Step on the workspace. Then, we change the Assignment Type from InSession to Assigned.
Next, we  Assignment…
In the Assignment window we pick the assignee for our Form. In this example we pick an existing Account. Click Done when finished.
Back in the Form Step settings we can locate Action Based Outcomes and click Add New link.
We configure first Action Based Outcome in the resulting window and click Ok to save and close this window.
Then, we add another Action Based Outcome. We configure this outcome as following…
In this way we end up with two Action Based Outcomes (Approve and Deny) with Required Response Options.
Next, we locate Email Response Handling settings and pick Email Response Only Email Handling option.
After we pick the Email Handling option we should be able to see new Email Handling Settings. Mention that From option has Validation Error because From Email Address should match Email Address that is monitored by our Email Response Scheduled Job.
Next, in the Email Response Handling we configure From Email Address. Then, we are going to configure Email To Suggest Handling and Email When Response Does Not Match.
In the Email To Suggest Handling edit Email Body to include ResponseId and InlineResponse section.
Then, we edit Email Body for Email When Response Does Not Match to notify user that his or her response is not valid.
Then, under Email Processing Flow we check Process Email Response checkbox and click Edit Assignment Email Process Flow.
In the Flow Designer we observe Start Step and three End Steps based on outcomes from our Form: Denied (Action Based Outcome), Approved (Action Based Outcome), and Email Does Not Complete Step. Here we are going to implement our logic to handle Email Responses. Because we require Comments for Denied or Approved outcomes, we are going to check if Comment Section is not empty, and if it is, we are going to send Email back to the user notifying that Comments are required for the action. Then, we are going to check the Response and complete the Assignment on the Approved or Denied outcome. If we cannot complete the Assignment on one of these outcomes, we use Email Does Not Complete End Step.
First, we add String Is Null Or Empty step from All Steps [Catalog] > Data > Text category…
Then, we configure this step to check if Email Comment is empty. For the value input to the step we Select Value of EmailComment.
Then, on the True outcome from String Is Null Or Empty step we add Send Email step from the All Steps [Catalog] > Communication category.
Then, we select Send Email step on the workspace and click Show Mapping Editor.
In the Mapping Editor we configure Constant Subject and From field. Then, we connect EmailFrom field to To field. For the Body field we select Text Merge.Plain Mapping type and click Show Editor.
Our Merge Text Editor for Email Body configured as following… When finished, click Ok to close Merge Text Editor. Then, we can save and close Mapping Editor.
Back in the Flow Designer we connect the outcome from the Send Email step to the Email Does Not Complete Step. Then, on the False outcome from String Is Null Or Empty step we add String Is In List step from All Steps [Catalog] > Data > Text category.
Then, on the False outcome from first String Is Null Or Empty step we add another String Is Null Or Empty step from All Steps [Catalog] > Data > Text category.
Next, we connect True outcome from the first String Is Null Or Empty step to the Approved End Step, True outcome from the second String Is Null Or Empty step to the Denied End Step, and False outcome from the second String Is Null Or Empty step to the Email Does Not Complete Step. Select first String Is Null Or Empty step to configure data mapping. Here we check if EmailResponse is in Constant List of our Required Responses for Approved outcome.
Then, we configure data mapping for the second String Is Null Or Empty step as following… We check if EmailResponse is in Constant list of Required Outcome options for Denied outcome.
This completes our Email Processing Flow. We can save the Flow and close Flow Editor.
Then, we can save and close our Assignment Flow.
To test our Email Processing Flow we Run Assignment Flow.
We receive two emails in the Assigned user Email box: Assignment Notification and Inline Email Response.
Then, we response Inline, but leave empty Comments.
Next, we receive the Response, and when our Email Response Job monitors our Email box…
… it sends out an Email that notifies user about required comments.