This medication is used to treat certain types of constipation (chronic idiopathic constipation, irritable bowel syndrome with constipation).