Even when you do extensive homework before making a purchase or contracting for a service, things can still go wrong.

Although most of us gripe about service headaches to family, friends, and coworkers, we seldom — studies show it's as few as one out of four — complain to the company that dropped the ball. And many consumers who do complain to businesses do so ineffectively.

A lot of consumers remain silent because it seems to be too much trouble to complain, or they want to avoid a confrontation. Others don't complain because they think it won't help — the warranty expired a week ago, so the store won't do anything. But telling a company, especially a reputable company, that things didn't go well usually produces good results. The trick is to complain competently, and to diligently follow up.

The first step is to make sure the company's owner or manager knows you are dissatisfied. Even if the employees you dealt with know you're unhappy, that information might not reach someone who has the authority — and cares enough about customer service — to put things right.

When you complain, state the facts as you view them, why you feel entitled to relief, and how the company can make amends. Make your request reasonable. For example, don't ask for a full refund on a home improvement project if four out of five tasks were performed correctly.

Use firm language, but avoid threats; no one responds well to hostility: If you are intemperate, an otherwise reasonable business owner might respond in kind, and what could have been a calm (and quick) resolution turns into a feud. Even if you believe you were intentionally cheated, don't utter words like "crook," "criminal," "incompetent," or, you know, worse.

If your complaint involves a product that you bought or was installed, contact the manufacturer. Even if your problem did not result from a manufacturing defect, the company may want to settle your claim rather than risk your ill will. Call the company, and obtain an email address or phone number for the company's CEO or president. Although the company's top executive is unlikely to handle your complaint personally, his or her staff is likely to get it to someone in the company who can help you — and is more likely to respond to a request that comes from the top.

Another option is to post your complaint — and your desired resolution — on Facebook or Twitter and tag the company. This forces the company to decide whether it wants to gain good or bad publicity from your dispute. While it's not too risky to ignore one customer's complaint, many companies don't ignore complaints that have been broadcast to hundreds of other potential customers. Many companies, particularly national ones, have staff who monitor social media websites to resolve complaints quickly and show that the company is responsive to its customers.

Still no favorable resolution? Fortunately, there are third-party programs that can help.

If you paid using a credit card, the federal Fair Credit Billing Act and the policies of credit card issuers provide enormous leverage by allowing you to withhold payment for goods and services you believe are defective or not delivered as promised. After you've tried unsuccessfully to resolve the matter with the service provider, contact your credit card bank to dispute the charge (you usually can do this even if you've already paid the bill). Once you've requested this "chargeback," your credit card bank will place a hold on the disputed charge and investigate. The service provider can protest the chargeback, but sellers rarely successfully reverse chargebacks if the customer has returned (or tried to return) the goods or can document the service defect.

Another option is to file a complaint with your state's Office of the Attorney General. In Delaware, contact its Fraud & Consumer Protection Division (302-577-8600); in New Jersey, contact its Division of Consumer Affairs (800-242-5846); and in Pennsylvania contact its Bureau of Consumer Protection (800-441-2555). Staff might do more than resolve your complaint; they might get the merchant to agree to change business practices and/or provide relief to additional aggrieved consumers, or they might force the business to pay penalties.

Private agencies such as the Better Business Bureau might also help you. But government agencies have the force of law behind them. Governments can conduct formal investigations and use law enforcement tools such as subpoena power to obtain the facts that will help them negotiate a settlement on your behalf. Government consumer offices can pursue legal action if evidence shows the merchant has violated the law. And the staffs of government agencies are more likely to negotiate on your behalf than are mediators with private and voluntary programs.

If you still can't resolve your complaint, you may be able to bring an action in small-claims court. Most courts have legal advisers to help you prepare your case.

Delaware Valley Consumers' Checkbook magazine and Checkbook.org is a nonprofit organization with a mission to help consumers get the best service and lowest prices. We are supported by consumers and take no money from the service providers we evaluate. You can access all of Checkbook's ratings free of charge until Aug. 5 at www.checkbook.org/Inquirer/HowToComplain.