This week, Republicans unveiled the American Health Care Act, the bill written by Congress, and adopted by President Donald Trump, to replace Obamacare (without quite repealing it).

The rollout has been less than stunning. Speaker of the House Paul Ryan (R-WI) made a valiant effort, and the White House is backing him. Yet conservatives in both the House and Senate rejected the bill, Democrats want nothing to do with it, and it looks doomed to fail — if it even comes to a vote.

On the surface, this is a big potential failure for the young Trump presidency. But with the Trump White House, as with the campaign, there is always a certain amount of chaos that is deliberate (though Trump, quite deliberately, never indicates how much).

In this case, the repeal/replace debacle allows the president to improve his leverage over all of the other policymakers: the Republican leadership, the conservative caucus, and the Democratic Party. (Perhaps they just don’t know it yet.)

The Republican leadership will be the most severely chastened. They had six years to devise an alternative to the so-called Affordable Care Act, and came up with a plan that, surprisingly, falls well short of full repeal, while frightening voters who worry about losing their current (albeit expensive, limited, and widely disliked) health insurance plans.

President Trump has shown them he is willing to suffer for supporting them. But he has also proved to them their plans are political non-starters.

The House Freedom Caucus, Sen. Rand Paul (R-KY), and other conservatives are happy to see the Speaker’s bill struggle. But Trump has put them on notice, declaring that he will not back their own plans, and that the only alternative is to let Obamacare fail — with major consequences for the 2018 midterms. (More voters will blame Congress than Obama, fairly or unfairly.) Conservatives do have a unique opportunity to push their own ideas — but they know they must agree to something.

Democrats, meanwhile are bemused by the fact that Obamacare is proving so hard to repeal (not because it works — if it did, Hillary Clinton would have won — but because of the poison political pills Pelosi planted in it). But the fact is that Democrats have 25 Senate seats up for re-election in 2018, of which ten are in states Trump won.

Unless they can vote for a successful replacement for Obamacare, they will be in far more danger than the conservative holdouts. This week has rattled them, too.

In The Art of the Deal — which liberals ought to study as carefully as conservatives studied Saul Alinsky’s Rules for Radicals if they want to begin to understand a president they have only demonized and caricatured thus far — Trump explains that one of his core negotiating principles is: “Protect the Downside and the Upside Will Take Care of Itself.”

Today, the upside is obvious, but extremely elusive: a replacement for Obamacare that does not create new headaches for millions of patients. The downside is failure — either no deal, or a deal that hurts enough people to create a new opposition constituency.

President Trump has used the launch, and decline, of the American Health Care Act to highlight the downside — and take some wind out of the sails of the politicians and policy wonks who convinced themselves they had all the answers. As the bill falters, the next, inevitable step will be for nervous Republican leaders to ask Trump to offer a new plan.

And that plan will be more of a classic Trump bargain — one that does what Hillary Clinton and Barack Obama refused to do: namely, bring all of the stakeholders together, including doctors and patients, to hash out something everyone can accept.

The final flourish will be incorporating the changes as amendments to the American Health Care Act, so Trump can claim to have kept his word, while also allowing Congress to save face.

Do not be fooled by the bill’s early troubles. Another principle in Art of the Deal is: “Deliver the Goods.” Watch.

Joel B. Pollak is Senior Editor-at-Large at Breitbart News. He was named one of the “most influential” people in news media in 2016. His new book, How Trump Won: The Inside Story of a Revolution, is available from Regnery. Follow him on Twitter at @joelpollak.