Outgoing U.N. Ambassador Nikki Haley told NBC’s Today show on Wednesday that she took advantage of President Donald Trump’s stormy rhetoric and “unpredictable” nature to get things done at the United Nations.

“If I needed to pick up the phone and say, ‘This is what I’m going to do. Are you good with this?’ we kind of partnered in that. He would ratchet up the rhetoric, and then I’d go back to the ambassadors and say, ‘You know, he’s pretty upset. I can’t promise you what he’s going to do or not, but I can tell you if we do these sanctions, it will keep him from going too far,’” Haley said in the interview.

“I was trying to get the job done, and I got the job done by being truthful but also by letting him be unpredictable and not showing our cards,” she said.

Haley provided one of the most straightforward examples of the “good cop, bad cop” strategy in recent memory, as Today show interviewer Craig Melvin pointed out. She also endorsed unpredictability, which might be described as the core principle of Trumpism. Trump himself is partial to phrasing this as his willingness to “walk away from bad deals” and “put everything on the table.” It boils down to letting negotiating partners know the United States cannot be taken for granted, long-standing arrangements are subject to change if they no longer benefit the U.S., and proactively thinking about what the U.S. desires is good policy.

The president’s allies and adversaries naturally have very different opinions about the value of unpredictability. For an example of how detractors regard it, consider the Daily Beast’s headline for the NBC interview: “Nikki Haley: Trump and I Ratcheted Up the Crazy for U.N. Negotiations.”

Haley offered a clear explanation of how Trump’s unpredictability – which she implied was coordinated with her office more frequently than critics of the administration believe – helped break up diplomatic logjams and change the rules of some very stale games at the U.N., citing North Korean denuclearization as a paramount example.

“To be able to pass the strongest sanctions in a generation, that brought the world together and brought North Korea to the table, was really important,” she said.

When Melvin asked if a “victory lap” over denuclearization would be premature, Haley replied, “Ask any ambassador to the United Nations what it was like when North Korea was testing every other weekend. It was a dangerous situation. The idea that we now have them in a place where they’ve stopped the testing, the idea that we have them at the table, even if they’re going slower – don’t ever underestimate how dangerous that could have been.”

Haley said the key to working with President Trump was “being honest with [herself] and being honest with him.”

“To be able to tell him when I think we’re going in the right direction, or when I think we’re going in the wrong direction, and him being willing to listen to that and discuss it has been hugely helpful,” she said.