Refactor vgCategoryId field to externalCategoryId