A multi-stage multilayer systematic procedure has been developed for the selection of the optimal product portfolio from waste biomass as feedstock for systems involving water-energy-food nexus. It consists of a hybrid heuristic, metric based, and optimization methodology that evaluates the economic and environmental performance of added value products from a particular raw material. The first stage preselects the promising products. Next, a superstructure optimization problem is formulated to valorize or transform waste into the optimal set of products. The methodology has been applied within the waste to power and chemicals initiative to evaluate the best use of the biomass residue from the olive oil industry towards food, chemicals and energy. The heuristic stage is based on literature review to analyze the feasible products and technologies. Next, simple metrics have been developed and used to preselect products that are promising. Finally, a superstructure optimization approach is used to design the facility that processes leaves, wood chips and olives into final products. The best technology to recover phenols from "alperujo", a wet solid waste/byproduct of the process, consists of the use of membranes, while for the recovery of phenols from olive leaves and branches adsorption is the selected one. The investment required to process waste adds up to 110.2 million € for a 100 kt/yr of olives production facility while the profit depends on the level of integration. If the facility is attached to an olive oil production installation, the generated profit ranges between 14.5 MM €/yr (when the waste is purchased at prices of 249 € per tonne of alperujo and 6 € per tonne of olive leaves and branches) and 34.3 MM €/yr, when the waste material is acquired for free.