The Brahma Vaivarta Purana narrates that Sandhya committed suicide, after Brahma lusts for her.
God Vishnu resurrects her and names her Rati, and marries her to Kama.
A heavenly voice stops her on time, stating that after the marriage of Shiva, he will revive her husband.
The Kedara Khanda chapter of the Skanda Purana presents a very different version.
Sambara takes her to his house, but is unable to touch her as the goddess decreed that he would be reduced to ashes if he touches her.
Kama was thus instructed by the gods to make Shiva fall in love again.
Kama went to Mount Kailash with Rati and Madhu or Vasanta ("Spring"), and shot his love-arrows at Shiva (in another version of the legend, Kama entered Shiva's mind) and invoked desire.
When the god Shiva burnt her husband to ashes, it was Rati, whose beseeching or penance, leads to the promise of Kama's resurrection.
Often, this resurrection occurs when Kama is reborn as Pradyumna, the son of Krishna.