CoreBOSBB
Question about workflow - Printable Version

+- CoreBOSBB (https://discussions.corebos.org)
+-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17)
+--- Forum: Administrator Support (https://discussions.corebos.org/forumdisplay.php?fid=8)
+--- Thread: Question about workflow (/showthread.php?tid=410)

Pages: 1 2


Question about workflow - rslemer - 09-08-2016

I need created a workflow, to change field probability related a sales stage

Example

At first stage, prospecting I wish setting probability in 10%
At Second stage, qualify, I wish setting probability in 20%

I need created a new workflow for each stage or is possible created a rule, at only one workflow?


RE: Question about workflow - rslemer - 09-08-2016

Never mind

Solve!


RE: Question about workflow - joebordes - 09-09-2016

Please share your solution for others.
Thanks!


RE: Question about workflow - rslemer - 09-09-2016

I did not attempt that the condition could be both in the workflow or in the task

Thus setting conditions in each task, the stage is setting with correct value for probability

Although a task for each stage, was quite flexible so that the user can also change the priority value


RE: Question about workflow - joebordes - 09-09-2016

a client asked us to do this yesterday, I added an update field task in the forecast amount workflow which assigns the probability BEFORE the calculation. Inside the value I selected "EXPRESSION" and put this:


Code:
if sales_stage == 'Oportunidad detectada' then 10 else if sales_stage == 'Briefing' then 20 else if sales_stage == 'Propuesta Enviada' then 30 else if sales_stage == 'Interés del Cliente' then 50 else if sales_stage == 'Negociacion' then 80 else if sales_stage == 'Closed Won' then 100 else 0 end

HTH


RE: Question about workflow - rslemer - 09-09-2016

I thought about it, but had a problem
the system sets up a full value, as you did 10, 20, 30 and the user can change the values in the middle, for example 15 to have the feeling ...

with the evolution of the first stage, but we have not yet come the next stage


RE: Question about workflow - joebordes - 09-09-2016

I understand.

One of our community members has created a business rule that should be able to do this:

https://github.com/tsolucio/corebos/blob/master/modules/cbMap/processmap/FieldDependency.php

This should permit us to create dependencies between fields which is exactly what you are asking for.

This is still in an early stage of development though.


RE: Question about workflow - rslemer - 09-09-2016

I know businessmap is a powerful resource, but i don't understand how to use

Docs not clear for me ..

I don't know if i copy and paste code you post here ( and another post solution ) and how i set another fields in module

When have a "......." is for change for another value, or is to copy as is


RE: Question about workflow - rslemer - 09-09-2016

(09-09-2016, 03:40 PM)joebordes Wrote: a client asked us to do this yesterday, I added an update field task in the forecast amount workflow which assigns the probability BEFORE the calculation. Inside the value I selected "EXPRESSION" and put this:



Code:
if sales_stage == 'Oportunidad detectada' then 10 else if sales_stage == 'Briefing' then 20 else if sales_stage == 'Propuesta Enviada' then 30 else if sales_stage == 'Interés del Cliente' then 50 else if sales_stage == 'Negociacion' then 80 else if sales_stage == 'Closed Won' then 100 else 0 end

HTH

That stage value is a label in english? not working for me, always set 0 ... Sad

My code is there

if sales_stage == 'Prospecting' then 10 else if sales_stage == 'Qualification' then 20 else if sales_stage = 'Value Proposition' then 30 else if sales_stage == 'Id. Decision Makers' then 40 else if sales_stage == 'Proposal/Price Quote' then 50 else if sales_stage == 'Negotiation/Review' then 80 else if sales_stage == 'Closed Won' then 100 else if sales_stage == 'Closed Lost' then 0 end

Always put 0 at probability Sad

(09-09-2016, 06:41 PM)rslemer Wrote:
(09-09-2016, 03:40 PM)joebordes Wrote: a client asked us to do this yesterday, I added an update field task in the forecast amount workflow which assigns the probability BEFORE the calculation. Inside the value I selected "EXPRESSION" and put this:




Code:
if sales_stage == 'Oportunidad detectada' then 10 else if sales_stage == 'Briefing' then 20 else if sales_stage == 'Propuesta Enviada' then 30 else if sales_stage == 'Interés del Cliente' then 50 else if sales_stage == 'Negociacion' then 80 else if sales_stage == 'Closed Won' then 100 else 0 end

HTH

That stage value is a label in english? not working for me, always set 0 ... Sad


My code is there

if sales_stage == 'Prospecting' then 10 else if sales_stage == 'Qualification' then 20 else if sales_stage = 'Value Proposition' then 30 else if sales_stage == 'Id. Decision Makers' then 40 else if sales_stage == 'Proposal/Price Quote' then 50 else if sales_stage == 'Negotiation/Review' then 80 else if sales_stage == 'Closed Won' then 100 else if sales_stage == 'Closed Lost' then 0 end

Always put 0 at probability Sad
or like yours 

if sales_stage == 'Prospecting' then 10 else if sales_stage == 'Qualification' then 20 else if sales_stage = 'Value Proposition' then 30 else if sales_stage == 'Id. Decision Makers' then 40 else if sales_stage == 'Proposal/Price Quote' then 50 else if sales_stage == 'Negotiation/Review' then 80.0 else if sales_stage == 'Closed Won' then 100 else 0 end

not working too ...


RE: Question about workflow - joebordes - 09-09-2016

this one is wrong:


Code:
if sales_stage = 'Value Proposition'


note that it is ONE equal sign, that is an assignment not a condition, try changing that