Recently I read that some municipalities in California are restricting "official travel" to Florida and Texas, presumable over legislation they consider objectionable. In the past, I know they've also implemented bans on government purchases from companies that reside in these states for similar reasons. Is this a violation of Article I, Section 8, of the U.S. constitution, or "Interstate Commerce Clause", or more specifically the doctrine of the "Dormant Commerce Clause"?
Under the commerce clause, a state cannot (without authorization from Congress), forbid its residents to travel to another state, nor tax such travel. It cannot prohibit imports from, or exports to, another state. It cannot tax products from other states in general, or from specific states, at a different rate or in different ways from products made within the taxing state.
However, a state government may decide where its own employees will go on official business. It may decide where its own funds will be spent, and what products or services it will purchase for its own use. It may decline to purchase products from states with policies it disapproves of. It may forbid official travel that it would be responsible to pay for to such states, if it so chooses.
It can probably also encourage its citizens and residents not to travel to or buy from such states, as long as it sticks to persuasion, and does not impose any penalty or tax on those who do so trade or travel, and also does not refuse to deal with people who do deal with the state it dislikes.
This very question was somewhat pointedly not decided in a suit by Texas against California, which was denied permission to file suit (Alito and Thomas dissenting). A substantial portion of Texas' argument is based on the Commerce Clause (Count II: pp. 16-19). See also amicus brief from other affected states. This section of the motion recites the historical reason for the Commerce Clause, with suitable quotes from SCOTUS rulings, being "to avoid the tendencies toward economic Balkanization that had plagued relations among the Colonies and later among the States under the Articles of Confederation", Hughes v. Oklahoma, 441 U.S. 322. Texas argues that the ban "violates the Interstate Commerce Clause’s fundamental principle—“that our economic unit is the Nation” and “its corollary that the states are not separable economic units,”, H. P. Hood & Sons, Inc. v. Du Mond, 336 U.S. 525.
Texas notes that there is a “narrow exception to the dormant Commerce Clause for States in their role as ‘market participants,’ ” Camps Newfound/Owatonna, Inc. v. Town of Harrison, 520 U.S. 564, but the market-participant exception has never been extended "to a statute that discriminates against companies that do business in another State as a means to influence that other State’s internal policies". They further point out that "when, as here, a State uses its participation in a market to reach beyond the immediate parties with which the government transacts business (to influence another State’s policies, for example), it is no longer 'functioning as a private purchaser of services', Wis. Dep’t of Indus., Labor & Human Relations v. Gould, Inc., 475 U.S. 282".
However, that's Texas' side of the story, SCOTUS has not decided (and will not).