The CreatorCon Call for Content is officially open! Get started here.

How To Build Actions in FlowDesigner

av8rr
Tera Contributor

Flow Designer is fairly easy to understand in structure. However, I get particularly lost in building actions. Having a long history of development (C, C++, Assembly, Python, etc.), I still cannot figure out how this part of Flow Designer works.  I think the abstracted complexity is where I am getting lost.

 

For example, after building a trigger, I build my actions using flow constructs such as the 'if' statement. In the if statement, I drag a data element from the right-hand pane that represents a table (with multiple columns). This tells the if statement that I want to use that table. In the second part of the if statement, I then specify the condition. I might, for example, specify the condition table.column equals a value. 

 

This is my interpretation. I am curious .... is this correct? 

 

What are some good ways to approach building actions? How should I be thinking about the building of the action?

 

Thanks

4 REPLIES 4

NikhilKumaK
Tera Expert

Hi @ av8rr ,

 

The flow designer is a feature in ServiceNow, Which is used to automate the process.

  • The flow has the Trigger, which denotes the on what condition the flow should run.
  • You have to define the Actions, which denotes what action or task you have to perform based on Trigger conditions.

Thank you for the reply Nikhil.

 

As I stated, I understand what Flow Designer does and how it is structured. I also understand how to build triggers and even how the branching logic works. I don't know how to build logic in "if" statements using data elements.

 

For example, in the c language, I can write this statement: if (x==3) { do something; }

In Flow Designer, it seems I first have to bring in an object (say a table like 'members') and then perform the if statement on a field in that table (for example, members.first_name). Let me know if I got that right. When selecting data elements, we just do a lot of drag and drop, but what exactly am I dragging and why.

 

I hope that explains my confusion.

Sandeep Rajput
Tera Patron
Tera Patron

@ av8rr You can choose to build a custom flow action in the following cases.

1. When the similar action is missing in OOTB action set.

2. When you need to get something done via script which can't be accomplished using Lookup record action.

3. When you need to make a REST call and process the response

4. When you need to make the same action available across multiple flows.

5. When there are multiple script steps/API calls involved as a part of the same action.

 

Please mark the response helpful and accepted solution if it manages to answer your question.

Thank you for the reply Sandeep.

 

My question was on flow logic in Flow Designer not specifically for Custom Action, but for any Action (even in Actions, Flow Logic, etc.) As I stated, I understand what Flow Designer does and how it is structured. I also understand how to build triggers and even how the branching logic works. I don't know how to build logic in "if" statements using data elements.

 

For example, in the c language, I can write this statement:

 

if (x==3) {

    do something;

}

 

In Flow Designer, it seems I first have to bring in an object (say a table like 'members') and then perform the if statement on a field in that table (for example, members.first_name). Let me know if I got that right. When selecting data elements from the right -hand pane, we just do a lot of drag and drop, but what exactly am I dragging and why.

 

I hope that explains my confusion.