await _customerIo.Campaign(17)
.Where(broadcast => broadcast.InSegment(23))
.Where(broadcast => broadcast.Customer.Interest == "roadrunners")
.TriggerAsync(new { data = "foo" });
This would give us type safety (we already know what all the customer attributes are, but it would require adding a generic type argument to our entire class).
Everything in the API syntax, should be possible to implement using expression trees, but this may turn out to be a lot more work than required.
See: