MIAMI BEACH, FLA., OCT. 27 -- Key unions in the AFL-CIO, faced with a lack of consensus on a presidential candidate, are actively pursuing a strategy of having as many union members as possible come to next year's Democratic Party convention, regardless of which candidate the member supports.

Unions such as the International Association of Machinists, Communications Workers of America and the American Federation of State, County and Municipal Employees have instructed their local affiliates to win delegates to the convention in any way they can.

The AFL-CIO has asked its member unions to hold off endorsing a presidential candidate until the federation has voted on an endorsement. The federation policy also bars national officials of a union from working on behalf of a specific candidate.

But the ban does not apply to local union officials, and the politically active unions are working hard to have their members elected as convention delegates.

The communications workers released a poll today showing Massachusetts Gov. Michael S. Dukakis (D) had the most support from the CWA membership and made the strongest showing against Vice President Bush.

The poll also showed that nearly a third of the CWA members polled were undecided on a candidate.

CWA President Morton Bahr said that in his union the contest centers on Dukakis, Sen. Paul Simon (D-Ill.) and Rep. Richard A. Gephardt (D-Mo.). He said "from what I pick up," this is true in other unions, too.

Bahr said the CWA polls show that the union membership is inclined to vote Democratic in the next election. He said that at least half of the CWA members voted for President Reagan in 1984.

Other unions are conducting similar polls. Jesse L. Jackson has received strong support in various union polls, but key union leaders appear to discount him as a viable candidate.

Because of the ban on national union endorsements, Bahr said the union is instructing its members at the state and local level on how to get elected as a delegate to next year's Democratic convention. "We're telling them to run for the candidate of their preference," Bahr said.

The CWA has outlined a four-stage strategy for electing delegates, with each stage timed to specific primary elections. Loretta Bowen, CWA political director, said the goal of the union program is "to get as many delegates as possible."

James Booe, CWA secretary-treasurer, said, "At this stage of the presidential election process, the name of the game is electing delegates." He said the lack of consensus on a candidate "makes it necessary to come up with our own plan."

The machinists union last week sent a circular to its local union leaders encouraging them to "run now for the Democratic convention." The union told its local leaders: "In July of next year, more than 4,000 delegates will meet in Atlanta, Ga., to select the Democratic Party's presidential nominee, and it's important that as many of those delegates as possible will be representing workers."

Local union leaders in each state are being given specific instructions on how to be elected in their area.

Union officials admit the delegate strategy is not without risks. The AFL-CIO is not expected to take up the question of candidate endorsement until next February. If the federation holds to that schedule, many local leaders will have to commit to a candidate slate in the March 8 "Super Tuesday" primary elections before the AFL-CIO meets to consider its endorsement.

As a result, in some key states labor may end up with delegates backing someone other than the candidate endorsed by the AFL-CIO. Union officials here said they are unsure what they will do if that happens. It was unclear whether any union would instruct its members who were delegates to abandon their candidate before any votes are taken at the convention.