I don't know about William Sonoma, but Crate and Barrel never has codes. It stinks. The best they offer is a 10% discount for couples to buy things post-wedding on their registry that none of their guests did. Occasionally they have sales (annual upholstery sale, shipping, etc), but no codes floating around. You'd think they'd have moved to that once the economy went phhhht, but so far no dice.
Sorry!