Higher-order processes in X-ray photoionization and decay