WASHINGTON — As Saudi Arabia’s leaders prepared to make a pitch to the White House for a visit by President Trump, a PowerPoint presentation was put together complete with slides describing Saudi demographics, investments in the United States and ambitious plans for reform.

Another slide showed pictures of three palaces Mr. Trump could choose to stay at should he come, including “His Majesty’s weekend personal residence.” Ultimately, someone must have thought better of it, because that slide was not shown. But the pitch worked. Mr. Trump heads to Riyadh on Friday, the first stop in his first overseas trip since taking office.

For foreign leaders trying to figure out the best way to approach an American president unlike any they have known, it is a time of experimentation. Embassies in Washington trade tips and ambassadors send cables to presidents and ministers back home suggesting how to handle a mercurial, strong-willed leader with no real experience on the world stage, a preference for personal diplomacy and a taste for glitz.

After four months of interactions between Mr. Trump and his counterparts, foreign officials and their Washington consultants say certain rules have emerged: Keep it short — no 30-minute monologue for a 30-second attention span. Do not assume he knows the history of the country or its major points of contention. Compliment him on his Electoral College victory. Contrast him favorably with President Barack Obama. Do not get hung up on whatever was said during the campaign. Stay in regular touch. Do not go in with a shopping list but bring some sort of deal he can call a victory.

“If you were prepping people for Donald Trump, the two or three points would be: one, bear in mind this is still a guy who focuses on wins,” Peter Westmacott, a former British ambassador to the United States, said. “He likes to have wins for America and wins for himself from bilateral meetings.”

“Secondly,” he continued, “he is a deal maker, a pragmatist. Third, this is a guy with a limited attention span. He absolutely won’t want to listen to visitors droning on for a half-hour — or longer if they need an interpreter.”

Image

Mr. Trump formed a closer relationship with President Xi Jinping of China during a visit at the Mar-a-Lago resort in Florida in April.CreditDoug Mills/The New York Times

Mr. Trump has been an especially active interlocutor with foreign leaders. During his first 100 days in office, he hosted 16 meetings with foreign leaders and, as of Monday, had made 76 phone calls to 43 leaders. Just this week, he hosted at the White House the crown prince of the United Arab Emirates, the president of Turkey and the president of Colombia, while talking by phone with leaders like King Abdullah II of Jordan and Prime Minister Benjamin Netanyahu of Israel.

In the past, presidential phone calls were made only after much deliberation and with specific strategic objectives. But Mr. Trump is much more willing to get on the phone with little or no notice. When an ally like Prime Minister Theresa May of Britain or Chancellor Angela Merkel of Germany wants to talk with him, diplomats said, he will call back within hours, even minutes, without even insisting on knowing the purpose.

His approach will undergo a more profound test in the coming week as he encounters dozens of world leaders during a nine-day, five-stop trip. In Riyadh, he will attend meetings with leaders from across the Muslim world before heading to Jerusalem, where he will meet separately with Mr. Netanyahu and his Palestinian counterpart, Mahmoud Abbas.

At the Vatican, Mr. Trump will meet with Pope Francis. In Brussels, he will gather with other leaders of the 28 NATO countries and have lunch with the newly elected president of France, Emmanuel Macron. In Sicily, he will participate in the annual summit meeting of the Group of 7 powers, an event that typically also draws dozens of other leaders who show up for meetings on the side.

For Mr. Trump, personal interaction and chemistry matter.

“He immediately wants to make people feel comfortable,” said Dina Kawar, the ambassador from Jordan, whose King Abdullah has met with Mr. Trump in person twice since the inauguration. “The president listens a lot.”

So much so that Mr. Trump has proved willing to put aside long-held beliefs after talking with a foreign leader. King Abdullah flew to Washington without a White House invitation in the early days of the administration to urge him not to move the American Embassy to Jerusalem as he had promised. After the king argued that it would provoke a potentially violent reaction in the Arab world, Mr. Trump shelved the move.

Another case in point is Mr. Trump’s unlikely new friendship with President Xi Jinping of China. Although Mr. Trump spent years castigating the Chinese as the “enemy,” a get-together with Mr. Xi in Florida went so well that he has heaped praise on the Chinese leader, calling him “a very good man.” Mr. Xi brought with him a theoretical 100-day plan to improve trade ties and a promise to increase pressure on North Korea, giving Mr. Trump achievements to trumpet. The president has since dropped or moderated his complaints about Chinese currency and economic practices.

Image

Mr. Trump greeted Prime Minister Malcolm Turnbull of Australia this month in New York City. The two leaders had a contentious phone conversation in January.CreditAl Drago/The New York Times

It helps to establish a family connection. Mr. Netanyahu has emphasized his relationship with Jared Kushner, the president’s son-in-law, going back to when the young man was a child. Prime Minister Justin Trudeau of Canada took the president’s daughter Ivanka Trump to “Come From Away,” a Broadway show about Canadians who helped Americans stranded after the attacks of Sept. 11, 2001. Ms. Merkel invited Ms. Trump to Germany to join a panel on women’s entrepreneurship.

Ms. Merkel has also learned the value of simply staying in touch. While her meeting at the White House with Mr. Trump included an awkward photo opportunity that suggested coolness, she has kept in regular contact. When she planned to travel to Saudi Arabia last month, she called Mr. Trump first, ostensibly to ask his advice — counsel that after 12 years in office she hardly needed from a diplomatic novice.

“He values personal relationships,” Prime Minister Malcolm Turnbull of Australia said after a personal meeting in New York where the two men smoothed over an initial testy phone call. “He is a very warm leader, a very warm person with a very personal approach. That’s just been his business style.”

The British lapped the field by maneuvering to make Mrs. May the first foreign leader to meet with Mr. Trump after the inauguration. She accepted an invitation to address a Republican retreat in Philadelphia in January, putting her in position to wangle a White House visit. It worked. And the British ended up tutoring the Trump team on how to choreograph a foreign leader visit — the format for meetings, who would be in which one, how they would make statements to the media.

Since then, Mr. Trump and Mrs. May have spoken by phone four or five times. The visit came off well enough that the Japanese and others then called the British seeking advice when their leaders were preparing to come to the United States.

The Saudis scored their own coup by persuading Mr. Trump to make Saudi Arabia his first foreign destination as president, beating Mexico and Canada, which have traded that honor since the 1970s. Mr. Trump chose Riyadh in part because Saudi Arabia is the home of Islam’s two holiest sites and in part because he hopes to strengthen the Sunni Arab alignment against Shia-led Iran.

Deputy Crown Prince Mohammed bin Salman did not even need to promote the palaces. The unused slide proposed that the president stay at the Al-Auja Palace but then offered two alternatives, the Al-Nasseriyah Palace or a guest palace that is really the Ritz-Carlton. The Ritz is where Mr. Obama stayed.

A version of this article appears in print on , on Page A18 of the New York edition with the headline: Tips for World Leaders: Keep It Short and Give Trump a Win. Order Reprints | Today’s Paper | Subscribe