Mechanism of action of Ergometrine, Oxytocin,.... Their indications in respect to child birth please

Mechanism of action of Ergometrine, Oxytocin,… Their indications in respect to child birth please

Ergometrine is use to arrest bleeding after child birth PPH and oxytocin is use for the contraction of the uterus during labour.