Image source: Walgreens Boots Alliance.

What: After Walgreens Boots Alliance (WBA 1.08%) management reported quarterly financials and indicated a willingness to work with Valeant Pharmaceuticals (BHC 5.33%) to make their distribution deal more successful, shares in Valeant Pharmaceuticals roared 15.6% higher on Wednesday.

So what: Forced by scrutiny to shutter its distribution relationship with specialty pharmacy Philidor last year, Valeant Pharmaceuticals inked a deal with Walgreens Boots Alliance to act as a middleman on many of Valeant Pharmaceuticals most popular medications.

Unfortunately, the agreement has -- so far -- been less rewarding to Valeant Pharmaceuticals than it has been to Walgreens Boots Alliance. Walgreens Boots Alliances fills prescriptions for Valeant Pharmaceuticals and receives a services fee for doing so. As a result, it benefits nicely as volume increases for Valeant Pharmaceuticals products.

Valeant Pharmaceuticals, however, isn't getting reimbursed from payers as quickly as it would like for prescriptions filled by Walgreens Boots Alliance, and in some cases, the amount that's getting paid to them is too low for Valeant Pharmaceuticals to turn a profit.

Now what: In Valeant Pharmaceuticals most recent quarterly conference call, newly seated CEO Joseph Papa said that management is aware of the problems its facing with the Walgreens Boots Alliance deal and that it's working on fixes. 

Papa reminded investors that the distribution deal with Walgreens Boots Alliance is in its early stages and that growing pains are to be expected. Walgreens Boots Alliance executives mirrored that thinking, similarly reminding investors today that it's only months into a 20-year relationship.

Specifically, Walgreens Boots Alliance co-COO Alex Gourlay said:

Yes, we are satisfied and pleased with performance in the dermatology business. The volume is as we expected. And remember, we [get] paid for the service we provide. We're not paid on the margin mix here at all. So we're satisfied the relationship is good. We know Joe well from the past from Perrigo where the group had a very good relationship with Joe and Perrigo. And we are in constant dialogue with Joe and the management team. [We] see their situation and we are very willing to help them in a positive way. So it's early days a 20-year contract and from our point of view we are pleased.

Importantly, Gourlay added, "We want to help our partner to be more successful in market."

How Gourlay and Walgreens Boots Alliance can help Valeant Pharmaceuticals be more successful via their relationship wasn't clear, and it seems to me that Walgreens Boots Alliance is in the driver's seat regarding any potential changes to this deal. Nevertheless, investors latched on to Gourlay's comments as evidence that Valeant Pharmaceuticals may be able to get a handle on margins associated with scripts Walgreens Boots Alliance fills. If they can, it would be very good news for the embattled company.