Backup iPhone before repair
Is it mandatory that we backup the iphone before repair?
Yes, you'd better backup iPhone before repairing to prevent the data missing issue. Indeed, iCloud provides easy way to backup iPhone.Go to Settings>iCloud and then scroll down to Backup.Here you can turn backups on and initiate a new backup immediately. If this is your first iCloud backup it might take a while to complete. Once the backup is complete, though, your iPhone will automatically backup when idle for an extended period of time and on an active wi-fi network. Of course, it is also simple to restore from iCloud after resetting your phone and choose "backup from iCloud".
It is not necessarily mandatory for you to back up iPhones before repairs, but it is highly recommended. There can be issues that occur during a repair that cause the phone to not turn on or not accept iTunes that would make getting the information off the iPhone impossible. I always tell my clients to back up their iPhones before each repair to cover any liability on my end.
Hope this helps.