Perform Conditional Branch

NO IMAGE

Japanese may be displayed on some pages.

 Home > User guide > BOT > How to use the BOT editor > Perform Conditional Branch

Introduction

What is a conditional branch

When the robot processes a task, you can change your operations depending on whether the set conditions are met.

Use the conditional branch

Record your operations if the condition is met.

1. At any position in the task, click "Conditions" within the task. Set the conditions used for conditional branching.

2. Move the task position inside the condition and record the action. The operation performed here is executed only when the set conditions are met.

* If you want to move the task and continue recording, the specified conditions must be met on the page you are currently recording.

* If the task cannot be moved within the conditions, it is necessary to change it so that the contents of the data and the contents of the page meet the conditions.

Add an operation when the condition is not met

1. Click the "End Condition" part in the task, and click "Add a mismatch condition".

2. Move the task position inside "Miscatch condition" and record the operation. The operation performed here is executed only when the set conditions are not met.

* If you want to move the task and continue recording, the specified conditions must not be met on the page you are currently recording.

* If the task cannot be moved within "Miscatch condition", it is necessary to change the data contents and page contents so that they do not meet the conditions.

About setting conditions

About the values to be compared (left value, right value)

You can select the data acquired in the page and the value passed to BOT at the time of execution. You can also specify any character string as the comparison target by selecting any value.

About comparison conditions

You can select the comparison condition from " is equal to", "is not equal to", "includes", "does not include", "is less than", "is less than or equal to", "is greater than", and "is greater than or equal to".

About advanced condition settings

You can set any conditional expression by checking "Type directly" when setting the condition. The execution result of the last line of the written JavaScript is used for judging the condition.

The value stored as data in BOT can be referenced by using $ {data name}.

Logical operators such as "&&", "||", and "!" can also be used. For example, the following can be specified.

■ Setting example

9 <$ {current time} && $ {current time} <21

$ {Keyword} == ‘Cookie’ || $ {Keyword} == ‘Biscuit’

$ {Product Price} .replace (',','')> = 2500

*Click here for more information about JavaScript descriptions and specifications.

フィルター

フィルターの条件に適合する場合に、条件式の内容が評価されます。
適合しない場合は条件内のタスクはスルーされ、次のタスクへ進みます。

最終周

グループ処理の最終周のみ実行されます。

Introduction of concrete usage examples

Summary  

Here is a concrete example of using conditional branching. Here, we explain how to make a BOT that "registers new product information if the product code does not exist, and updates the product information if the product code does not exist".

Procedure introduction
  1. Create the data used for product registration.
  2. Record login operation.
  3. Search for a product by product code.
  4. Register new product information if the product does not exist.
  5. Update the product information if the product exists
Watch a Video   No audio.

Watch in HD