What will I lose if I install Cyanogenmod?
The phone memory will be wiped by the Cyanogen install. Everything will be erased.

If you have a separate SD card, that should not be altered, so if you apps store data there, you may still have it after you reinstall each app on CM, or you may be able to manually copy over the old data and thus restore it.

Contacts and call logs are synced to your Google account so unless you disabled that, once you install CM and put in your account info, they should be restored.

WhatsApp, Telegram, and Viber history: Depending on the app, this may be stored in phone memory, the SD card or your account with the app's vendor. I believe for the three you mention, all keep your data tied to your account in their own server, so you should be able to recover it once you install the app on CM and put in your account.

Photos will be saved if they were on the SD card.

SMS's will likely be lost.

When I flash ROMs, I eliminate the ambiguity by just manually backing up whatever is important, and wiping the phone clean. Much simpler, and does not rely on trusting some backup app developer to get everything right.