I have an engagement plan and there are number of contacts in each state.
How can I programmatically obtain list of contacts which are in specific engagement plan state by state ID?
Sitecore Stack Exchange is a question and answer site for developers and end users of the Sitecore CMS and multichannel marketing software. It only takes a minute to sign up.
Sign up to join this communityI have an engagement plan and there are number of contacts in each state.
How can I programmatically obtain list of contacts which are in specific engagement plan state by state ID?
Have just found a method:
var pageableContactIds = AutomationManager.Provider.GetEnrolledContactsIdsByStatePaged(engagementPlanStateId);
This will return an object of type Sitecore.Common.IPageable<ID>
which provides a method .GetAll()
Seems to work for me.