I have a workflow which should create an integration event. It is only created under special circumstances. Details below:
Workfly type is when modified record saved.
Record type is Account.
Integration Queue is a custom queue.
The workflow updates the description field and unchecks a checkbox in addition to the integration event. These actions make it easy to verify the workflow is firing, and it is. The problem is that the integration event is simply not created. The tracked fields list includes the accountId, the checkbox being updated, the description field, and the account name. According to the documentation, one of the tracked fields must be changed in order for the event to occur. This means the integration event should occur when the checkbox is modified. Since the workflow fires when the checkbox is checked, and one of it's actions is to uncheck this checkbox, the integration event should always be created. It is not. Adding the modified field to the tracked fields should guarantee the integration event is always created. It does not.
There is a wait command in the workflow which can cause problems, according to the documention. This is not the issue. The wait statement has been disabled and all the testing redone, it has no effect on the integration event.
Disabling every workflow except the integration event workflow does not work.
Adding different fields to the tracked fields list when configuring the workflow action to create the integration event does not work. Changing the description with the description as a tracked field does not work. Other short texts and picklists do not work. The ONLY thing that does work is if the account name is changed, then the integration event is created.
Maybe only certain default fields work as tracked fields? Perhaps, but performing the same testing on the Opportunity object shows that not even changing the Opportunity Name works. Changing some other field may eventually work but this kind of testing is time consuming and wasteful.
So the answer turned out to be, just wait. Changes to the tracked fields don't actually update instantly. Wait a few hours and then it will suddenly start working. This can be verified by turning off ALL tracked fields and watching the integration event still work when it should not. Similiar to how you have to wait after creating custom fields for them to actually work in web services or the field to show up in reports.