:salam2:
According to what I heard from Shiekhs, this is called ''Nather'' if I am not worng. For example someone is ill, they make dua to Allah (swt):
''O Allah, cure me from my illness, and I promise I will feed 20 poor people once YOU (swt) cure me''..
There is a ruling on Nather, but I couldnt any information on this. I heard once from a shiekh that its obligatory to fulfil your promise, otherwise you have to fast or feed poor people''.. (EVIDENCE NEEDED?)
Dont take my words for it on the ruling of Nather, because I am not knowledgable and I dont have proof relating to it, but I believe its called ''Nather'' if I am not wrong.
Inshallah someone knowledgable will supply the details inshallah..
Wassalamu Alykom