1 "一切" can be used a noun, meaning "everything", while "所有" can't.
e.g.
这里的一切
我的一切
2 As you know, they can both be used before a noun, meaning "every" or "all". I can't (and I don't think anyone can) tell you "In ... cases, you can only use ...", though most learners of foreign languages are curious to know such answers.
However, I can assure you that you can use "所有(的)" whenever you can use "一切" (except it's used as a noun, as I have mentioned above). Therefore, don't hesitate to use "所有(的)". You needn't think about whether "一切" can be also used when you are trying to construct a Chinese sentence with the word "所有" in it, need you?
Some people say "一切" can't be used before human beings, but I disagree. Though we never say "一切人", "一切老师", we can say "一切敌人".