Good intentions are necessary to educate children. It is a way to prevent them from behaving negatively by letting them commit to a good deed before the negative occurs. In this sense, to avoid bad behavior you have to request good intentions from your children and they will cooperate to have good behavior.
Practically speaking, when we solicit the good intentions of a child, we will have to collect them first by graciously confronting us with a smile and a kind voice, then by focusing on what they are attending to or helping them with something. When we feel we have your attention, we can direct them toward realistic goals and work in anticipation of problems.
We can attract the child with their good intentions and identify how we would like them to act, instead of focusing on their failures and bad actions. We can also support and encourage a child when they are faced with challenges to fulfill their intentions. It is one thing to form an intention and another thing to be able to achieve it.
Even as adults we make intentions that we find difficult to fulfill: this is only part of being human. What matters is how we deal with the internal conflict that arises between our goals and the impediments we face in achieving them.
When we side with a child and seek their agreement to point in a particular direction, we help them realize that it is natural to struggle with conflicting thoughts and feelings. It may seem small and insignificant to solicit a child's intentions today, but this is how a child begins to realize that You can direct your own behavior and reach your human potential.
So from now on, before you foresee a stressful situation like the children not wanting to leave their friend's house, the park or get out of the pool when it is time to go home ... Request their good intentions before that happens, and tell them something like: "We will be in the pool for half an hour, then you will have to leave to enter the house, can I count on you for this?"