> For the complete documentation index, see [llms.txt](https://docs.work-relay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.work-relay.com/automations/best-practices-screensteps/review-process-examples/build-a-process-for-credit-approval.md).

# Build a process for credit approval

Make sure you are in the Work-Relay application and have followed the [steps to set up Work-Relay.](/administration/setup/complete-overview-of-setup.md)

Also, in order for you to be able to create this process in your version of Work-Relay, you will have to import Custom Objects by following these instructions: [Import Custom Objects to Create Example Processes](/automations/best-practices-screensteps/review-process-examples/import-custom-objects-to-create-example-processes.md).

## Overview

The purpose of building this example process is to give you a chance to try Work-Relay out without having to think of a process on your own. After you create this process, you will know the basics of how to navigate around Work-Relay, and see how it could help your operations run smoother.

The goal isn't to teach you everything there is to know, but to give you an idea of how you can take some of your internal processes and turn them into Work-Relay processes. We assume that you know the basics of Salesforce and are familiar with how basic process diagrams are constructed.

## Part 1

![](/files/4d76d22e0fe5dd37625092088c23f03306e9adbb)

This is an example process of issuing Credit to a buyer who bought something after a sales call. Let’s suppose a Sales Rep who’s working with the Customer creates a Credit Form Record - this will start a Process Flow on this Record.

The first thing we'll do is create a process. Click on the links below to see step-by-step directions for creating a process.

{% stepper %}
{% step %}

## Click new process

![](/files/db1d9068414ee8213c88304c06d1ed39b290b8d2)

### Give the process a name

![](/files/0977cc51c0579d936e86f6c2c02b4367f0278511)

You can also add a description if you think it will be helpful for later on.

### Use WR Credit as a data source

![](/files/ff3c11b9168d1820b9d15d264506b5c73e705a1f)

1. Click on the box next to Use custom Data Source?
2. Select WR Credit
3. Click Next

{% hint style="info" %}
The data source is an object that the process will be touching throughout. For this example, the object WR Vacation Request is where the data will sit related to a vacation request.
{% endhint %}

### Select the method - when record is created

![](/files/d6162f78129e77e57cedf9f2c5d17fdcdfb097f1)

You do not need to fill in any additional fields. After you select the method, select Next >>

### Click "Next"

![](/files/4b770254021530a324928f2ae4e30a801982d2c4)

### Click "Save"

![](/files/efc30922dc02e9866e3dca2930a295c40ab9bab8)

### Add responsibilities

{% endstep %}

{% step %}

## Add swimlanes

![](/files/ba4369fc11a986f440cb7f102ca45aa590376453)

Click and drag the Responsibility icon to the canvas to add a swimlane. Do it one more time to add another - you should have a total of **three swimlanes.**

### Modify the swimlanes

![](/files/6d5f14eac89db308bcdb9efcf97d7bf06c00bf24)

1. Click on the blue section of a swimlane
2. Rename the swimlanes
   1. Name the first swimlane Sales
   2. Name the second swimlane Credit Dpt
   3. Name the third swimlane Credit Dpt Supervisor

### Add users

![](/files/1cea523049c678aa599ab2e453df0bf8457c4b1a)

Click on the blue bar of a swimlane, then click Add Users.

### Add yourself

![](/files/9a6bcb2ed0d87020f8dd9cffb23c674f2065ae2f)

Since this is an example, add your name to indicate that you are responsible. When you create a process for your organization, this is where you will add the name of the use who is responsible for the associated tasks.

{% hint style="info" %}
Make sure to add yourself as the user for each swimlane.
{% endhint %}

### You should be the user for each swimlane

![](/files/97b1000b00796b9b280f492f8d76382132013724)

Make sure that your name is the assigned user for each swimlane.
{% endstep %}

{% step %}

## Add a steps to the process

![](/files/1b70878d9e49644ca313191b588640c5a77c964c)

We'll start off by clicking and dragging the Decision shape to the canvas.

### Rename the start action

![](/files/5e7c7d58d1b988945e6f466bbe7df9146104b074)

Double click on the shape to rename it.

### Add a process to HR administrator

![](/files/a354dec48a9f6d6704cd92e4e777d100e0c920ee)

### Make your canvas look like this

![](/files/4d9ef53a3d6788326ae7709d9bc23b476f8b343f)
{% endstep %}

{% step %}

## Connect the shapes

![](/files/52971980374387e8304547f22725dfb4de0afcb5)

Hover your mouse over the Start shape. When the blue ball glows, click your mouse and drag down to the Approve? shape.

### Connect start shape to the first step

![](/files/f98d84e46ccb499d677eaeaa189b6203958d2fe8)

### Connect the remaining shapes

![](/files/b69660539ede19479a7c809e97bcc6f9617f5a2d)

{% hint style="info" %}
You can rename the connectors by clicking on one and updating its properties in the right-hand side.
{% endhint %}
{% endstep %}
{% endstepper %}

## Part 2

![](/files/c7140a57d48ce88bc1160046f82f4be4a1b3a0b3)

Now we have the process set up, we can add a few actions that will automatically perform tasks such as sending out emails or updating fields. Click on the links below to see step-by-step directions for creating a process.

{% stepper %}
{% step %}

## Add actions

![](/files/5da4ed95c90274a925f6012af3578bcbfc6b5d2a)

### Click and drag the send email icon

![](/files/a0772615a01cc931a1b3925b7c55a278ad23cb3d)

### Create the email

![](/files/00d29a8b5b5dfd922fcd6d8275a2b5dfb8d1009e)
{% endstep %}

{% step %}

## Save

![](/files/af9023a48b2e50c78531ff211418a527d970bca4)

### Activate the process

![](/files/e63bac3e3e3f82ca442b60ea35c20dd9c3a71b69)
{% endstep %}

{% step %}

## Create a step rule

![](/files/e5fbd3c23550a7352e2e23c6cb0e2ff3fb97feb1)

A Step Rule​is a validation you may add to a Connector or to a Step to prevent a Step from proceeding if the Rule condition(s) is met (or not met). In this situation, we must check whether a WR Credit Terms Record related to current WR Credit, exists.

### Click the + icon

![](/files/eb037875918ba75a67433d5d46556e6379b5da70)

### Name rule > click advanced option

![](/files/8d6f4a47c45f00c966acc4e1e4b1e1be787ea4b0)

### Click add condition

![](/files/5f08c8d6f71602b7dec90d0c9dcab8ed640023c7)

### Define action

![](/files/cce78bf5dae44f294ae53291ab09bd65ba5f05d3)

Make your action match the image above.

### Write error message > click save

![](/files/776f2c5f91113d191e5abe7e3c607a0e4adb0042)
{% endstep %}

{% step %}

## What it looks like with actions

![](/files/309801961ff7dcb0532f61ec6c2b79507d6861d1)
{% endstep %}
{% endstepper %}

## Part 3

To see what Work-Relay does, we're going to kick off the process by creating a new Credit Request in the WR Credits Object.

![](/files/9108335032fe5017494b74bb18a4af2e7f838fe7)

{% stepper %}
{% step %}

## Open the WR Vacation Requests object

![](/files/a66509967236b63803af8ee848ef6311ba3ea28a)

### Click new

![](/files/10de2449c6d8c3be5fbe66c9872cffc001c5252a)

### Save the new request

![](/files/c4a60f7256f2ac8be0442f609345e89199c3b389)
{% endstep %}

{% step %}

## Chatter alerts you

![](/files/9037a41125fce6b4fcb8c2a56dd4eec406b7fc75)

### A visual of how far along the process is

![](/files/ccf2a94d7b7ccbf9dd9efa587d99c834e0040640)

### Chatter alerts you

![](/files/3349e383a5fba2e7e62201b5ee04f05522c0e466)

As you continue through the process, Chatter will continue to alert the responsible party that the next step is assigned.

### Continue to track progress until process is complete

![](/files/3fead6c78414fc16a4a23ccee6238dd9379287fa)
{% endstep %}
{% endstepper %}
