In Paulo Coelho's The Alchemist, actually it is not the alchemist that convinces Santiago to go on his trip to pursue his Personal Legend, unless you believe that Melchizedek (the King of Salem) that Santiago meets early on, is the same person. (I do not: Melchizedek talks to God, referring to him as "my Lord." The alchemist is a teacher, not a "prophet" like Melchizedek.)
When Santiago decides to follow his dream of treasure by going to the Pyramids in Egypt, he asks a gypsy woman to explain his recurring dream. For this she asks for ten percent of his treasure if he finds it. In the marketplace, the King of Salem approaches the boy (Santiago) and tells him that he will give him the information he needs to find his treasure for a tenth of Santiago's flock.
It is Melchizedek (the King of Salem) who explains about Santiago's Personal Legend and omens, and that once he begins to follow his dream, the universe will do all it can to help him reach his goal.
When you want something, all the universe conspires in helping you to achieve it.
The second piece of information that the King of Salem gives Santiago is that just when you are ready to quit, that is the time you must move forward, so as not to come so close to your goal that at the last minute, you turn away from it—never knowing how close you actually were.
As an example, he tells the boy that sometimes he (Melchizedek) appears to someone—in an unusual form—just about the time that person is ready to quit following his Personal Legend. Recently he has helped a miner who had been searching for an emerald.
...the miner was about to give it all up, [and] if he were to examine just one more stone—just one more—he would find his emerald. [Melchizedek] transformed himself into a stone that rolled up to the miner's foot. [In anger, the miner] picked up the stone and threw it aside...it broke the stone it fell upon...and there...was the most beautiful emerald in the world.
The King of Salem tells Santiago this story so he won't give up, giving him encouragement and direction to hold onto his dream.
(Santiago does not meet the alchemist until the later part of the story, and the alchemist helps Santiago realize what true treasure is—love—and how to achieve his Personal Legend.)
The King of Salem tells Santiago about his dream before the boy ever speaks of it, and can read his mind, as he does regarding the boy's grandfather and omens, even as Santiago is thinking silently to himself. In showing that he is knowledgeable and powerful, he offers Santiago hope that he will find his Personal Legend simply by sticking to his path. Santiago's heart is open, and in these ways, Melchizedek is able to direction the boy onto the path that will bring him happiness.