This question was asked in another thread - thought I'd move it to it's own for easier reference.
Teaching a dog to go (urinate or deficate) on command is the ultimate behavior to backward-chain. You start by rewarding the behavior when it happens, then you give the behavior a name and ultimately you can ask for the behavior on command.
So, the first step is to take your dog outside and hang around with them until they go.
Oops, back up a step. You need to decide if you want to use just a basic command to cover both actions or be specific. Go Potty can mean pee or poop or both.
And you can use whatever command you like. I've heard Let's Get Busy, Go Potty, Do Your Business and so on. For my boy Riggs I use "Go Pee on a Tree!".
So, back to the first step - mark the behavior. Go outside and hang out with your dog until they start going. I'm going to use the peeing behavior - this works for either one.
As soon as the dog starts to pee I use a calm, quiet voice and say "Go Potty, Riggs". I keep repeating this as he is peeing. As soon as he finishes peeing I make a HUGE fuss ... "GOOD GO POTTY!! GOOD BOY!! GOOD GO POTTY, RIGGS!!!" with lots of praise and/or treats.
It usually doesn't take long for a dog to understand what you are praising them for.
Now I take Riggs outside and start saying "Go Potty" is a normal tone of voice. I may have to follow him around for a bit, repeating my command until he starts to pee. Then I do the calm praise - Good Go Potty" and then the huge fuss "GOOD GO POTTY!!!" when he is finished.