Working with variables

Learn how to make use of variables in your services

Once you finished this tutorial watch the following video for a deeper understanding of how the variables can be used.

Step 1: Combine variables

Add two additional text fields which are called Firstname and Lastname

In each field, click edit and make sure the checkbox Required is true.

Go to the Variables tab

Variable tab will list your created variables and built-in system variables. Here you can manage all variables that belongs to the service.

Click Create new variable and create a variable called DisplayName, make sure the type is ‘String’. Do the same procedure and add the variables Firstname and Lastname.

Go into the form editor and bind the variables Firstname and Lastname to the corresponding text field

Next, back to Workflow Editor

Drag in an Assign activity

In the Result field, select your DisplayName variable from the drop-down

In the Body section, type:

Hello @Firstname @Lastname (The text in body will be assigned to the variable DisplayName).

Tip: click the ? box for help.

Drag in a new State activity and bind the result to the DisplayName variable.

Now Save&Publish the service

Find the service in user view, fill out the fields Firstname and Surname, and place an order. The result should display Hello <firstname> <lastname> as a status message.

Step 2: Create a Request for support service

The service will fetch information from the created form and send an e-mail with the details to you.

Create a new Shared process.

Add the Form section element and form contents – fields to describe the issue, a field for the computer or device and a drop down for the operating system. Bind the field variables.

Click the Variables tab.

Create a new variable: emailBody.

Toggle back to Workflow editor.

Assign the variable you just created (to Result) and add the email contents.

Add a New Send E-mail activity and click Save. Fill out the fields (the System. Receiver.Email variable is bound to your email). Bind the emailBody variable.

Head over to the user web and search for your service.

Your Request for support service is ready. Try it out!