Logic related question

Hi All,

I am new to end to end project. I need some logic for the first step of the process.

In this process we are working for the internet and tv packages.

Here we are having some codes like 2010, 2020, 2030,2040,2050. based on these codes we should extract the data.

we are getting every time one code only like once we completed the code then only new one will added.

code data like
2010
1.account num
2.new term offer
3.existing term offer

2020
1.account num,
2.existing term offer
3.new term offer
4.existing package
5.new package

2030
1.account num,
2.existing term offer
3.new term offer
4.existing package
5.new package
6.prod atv pack

2040

1.account num,
2.existing term offer
3.new term offer
4.existing package
5.new package
6.prod atv pack
7.change new pack

Can any one help me build logic for this and which activities are useful to make it easy.

Hi @meeraa,

Switch activity looks ideal for your use case where you use integrer argument type in its properties.

Case : 2010
Inside the case you can invoke a workflow or activities where you extract the required values
Case : 2020
It’s logic
.
.
.
Case : 2040
It’s logic

You can also use Else-If activity where you check for each case starting from if and then else if for the rest of the scenarios.

1 Like

@meeraa You can use switch logic as below

Capture

Please find sample workflow below for ref

Example.zip (2.4 KB)

1 Like

hi @ushu

but the thing is they already created one library in that one of the activity can act like
In that activity in properties panel it will ask us like which code and which data we will extract.

but for me there is total 5 codes and different data how can i use that library activity and how can i apply this switch activity

will you help me by using that activity how can i apply switch activity.

if non of the code will appeared we should throw an error.

@meeraa Since you are saying you have already library for this, I guess you need not to use any other activities like switch etc. You can utilize your library for this . Can you share the screenshot of the properties of your library where it will ask which code and what data to extract

1 Like

Hello @meeraa ,

Are you trying to create an unattended bot or attended bot??

Hi @Rahul_Unnikrishnan , For unattended bot.

Hi @ushu ,
ui
in this pid is nothing but code, field is nothing but extract account num or required one.

@meeraa That means you have to pass the code and data you want to extract to the Field_Name. The output will be the extracted values from it

Is there any difficulty here

1 Like

i should use this code(pid) in the further process also. what should i do.

A-code-extracted values–based on A(code num) we will change which term offer is apply
B-code-extracted values–based on B(code num) we will change which term offer is apply
.
.
.
.
…

in these each CODE we are extracting 5 to 7 fields. if any one of the field is missing we should throw an exception. how to do it ? .

@meeraa Store the PID in a variable. So that you can used further in process

Also, for each code if you know what are the fields that need to be extracted, you can place those in config file in prior. This makes easy to check any one the field is empty for that code. The exp could be like this

(From S In ArrayValues
Where String.IsNullOrEmpty(S)
Select S).ToArray

ArrayValues variable contains the fields that it read from config

Please find attached workflow below

Example.zip (11.2 KB)

Note : In the workflow I read the fields from excel but you can read these from config
1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.