  Contention resolution schemes have proven to be an incredibly powerful
concept which allows to tackle a broad class of problems. The framework has
been initially designed to handle submodular optimization under various types
of constraints, that is, intersections of exchange systems (including
matroids), knapsacks, and unsplittable flows on trees. Later on, it turned out
that this framework perfectly extends to optimization under uncertainty, like
stochastic probing and online selection problems, which further can be applied
to mechanism design.
  We add to this line of work by showing how to create contention resolution
schemes for intersection of matroids and knapsacks when we work in the random
order setting. More precisely, we do know the whole universe of elements in
advance, but they appear in an order given by a random permutation. Upon
arrival we need to irrevocably decide whether to take an element or not. We
bring a novel technique for analyzing procedures in the random order setting
that is based on the martingale theory. This unified approach makes it easier
to combine constraints, and we do not need to rely on the monotonicity of
contention resolution schemes.
  Our paper fills the gaps, extends, and creates connections between many
previous results and techniques. The main application of our framework is a
$k+4+\varepsilon$ approximation ratio for the Bayesian multi-parameter
unit-demand mechanism design under the constraint of $k$ matroids intersection,
which improves upon the previous bounds of $4k-2$ and $e(k+1)$. Other results
include improved approximation ratios for stochastic $k$-set packing and
submodular stochastic probing over arbitrary non-negative submodular objective
function, whereas previous results required the objective to be monotone.
