I have a scenario where Case Owner is changed only using Apex code, rather than through assignment rules + default owner. We've been able to make it work for a couple of different Case creation scenarios.
However, when using email-to-case (at least on-demand) the assignment rules + default owner are applied.As this happens after the Apex code we use (an after insert trigger), the Case Owner gets overridden.
We have implemented a workaround, using a "dummy" assignment rule. It works, but it's not a very nice solution. We have some other ideas, but they may require more effort.
We'd like to understand our options. Is it possible to prevent the assignment rules + default owner from being applied in the first place when using email-to-case?