The following sentence, in my opinion, is ambiguous.
You must purchase A that optionally includes B, C, and D.
The meaning can be one of the following.
You must purchase A, C, and D. A optionally includes B.
or
You must purchase A. It optionally includes B, C, and D.
Question
How to remove ambiguity from the main sentence only by rewording it with a single sentence such that the reworded sentence means the first meaning? With the same constraint, how to make it means the second meaning?