After retiring from his career as a footballer, Viviani stayed at Vicenza as part of the coaching staff, serving as caretaker during the 2001–02 season alongside
Adelio Moro, and then as youth coach until 2005. He successively left Vicenza in order to follow his mentor
Edoardo Reja at
Napoli, working alongside him as assistant coach. During the 2009–10 season he then served as head coach of
Lega Pro Seconda Divisione club
Sambonifacese. In July 2010 he was called to replace
Eugenio Corini at
Serie B club
Portosummaga, being however removed from his managerial duties on 29 November 2010 due to poor results. On 5 December 2011, he was unveiled as new head coach of
Grosseto, until 1 February 2012 when he was sacked. On 9 October 2014, he was hired by Serie A club
Palermo as
Giuseppe Iachini's new technical collaborator. On 10 February 2020, he was appointed as the new coach of
Fujairah. He left when his contract expired in summer of the same year. ==Honours==