(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 ...
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
(09-09-2016, 06:41 PM)rslemer Wrote:or like yours(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 ...
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
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 ...