{{fscript "### Load Code from file ###" fileURL := resources ++ '/fetchRawData.fscript'. fetchRawData := sys blockFromString:(NSString stringWithContentsOfFile:fileURL encoding:4 error:nil). "### End ###" "## FunctionCall ####" fetchRawData value:nil value:nil. }}

LgoKnowledge Sales Funnel

{{show}} opportunities using {{pipeline.name}} pipeline in date range -

Summary

Data from all opportunities

Count % Value (no tax)
All Opportunities {{fscript opportunities count. }} {{fscript (opportunities valueForKeyPath:'@sum.total') - (opportunities valueForKeyPath:'@sum.taxTotal'). }}
Open {{fscript filter:= NSPredicate predicateWithFormat:'opportunityStateType = 0'. openOpps := (opportunities filteredArrayUsingPredicate:filter). globals setOpenOpps:openOpps. openOpps count. }} {{fscript "Calc % based on total" per := ((openOpps count) / opportunities count) * 100. per. }} % {{fscript (openOpps valueForKeyPath:'@sum.total') - (openOpps valueForKeyPath:'@sum.taxTotal'). }}
Abandonded {{fscript filter:= NSPredicate predicateWithFormat:'opportunityStateType = 3'. abandondedOpps := (opportunities filteredArrayUsingPredicate:filter). globals setAbandondedOpps:abandondedOpps. abandondedOpps count }} {{fscript "Calc % based on total" per := ((abandondedOpps count) / opportunities count) * 100. per. }} % {{fscript (abandondedOpps valueForKeyPath:'@sum.total') - (abandondedOpps valueForKeyPath:'@sum.taxTotal'). }}
Suspended {{fscript filter:= NSPredicate predicateWithFormat:'opportunityStateType = 2'. suspendedOpps := (opportunities filteredArrayUsingPredicate:filter). globals setSuspendedOpps:suspendedOpps. suspendedOpps count. }} {{fscript "Calc % based on total" per := ((suspendedOpps count) / opportunities count) * 100. per. }} % {{fscript (suspendedOpps valueForKeyPath:'@sum.total') - (suspendedOpps valueForKeyPath:'@sum.taxTotal'). }}
Won {{fscript filter:= NSPredicate predicateWithFormat:'opportunityStateType = 1'. wonOpps := (opportunities filteredArrayUsingPredicate:filter). globals setWonOpps:wonOpps. wonOpps count. }} {{fscript "Calc % based on total" per := ((wonOpps count) / opportunities count) * 100. per. }} % {{fscript (wonOpps valueForKeyPath:'@sum.total') - (wonOpps valueForKeyPath:'@sum.taxTotal'). }}
Lost {{fscript filter:= NSPredicate predicateWithFormat:'opportunityStateType = 4'. lostOpps := (opportunities filteredArrayUsingPredicate:filter). globals setLostOpps:lostOpps. lostOpps count. }} {{fscript "Calc % based on total" per := ((lostOpps count) / opportunities count) * 100. per. }} % {{fscript (lostOpps valueForKeyPath:'@sum.total') - (lostOpps valueForKeyPath:'@sum.taxTotal'). }}
Conversion Rate {{fscript "Calc % based on total" per := ((wonOpps count) / opportunities count) * 100. per. }} %


-- Back. reload data

LgoKnowledge Ltd. www.lgo.co.uk v1.0

-