Reputation: 883
I would like to Enroll a Sitecore visitor in a specific state of an engagement plan through WFFM. For this I took a Save Action Enroll in Engagement Plan and I have entered Parameters
<Host>smtp.gmail.com</Host><Port>587</Port><Login>[email protected]</Login><Password>password</Password><IsBodyHtml>true</IsBodyHtml><enableSSL>true</enableSSL>
and I have also added State to that save action.
But when submitting the button following error is occured: Enroll in Engagement Plan Error.
Please tell me what is the solution of this problem?
This error occurred in my LOG file:
2504 21:17:36 INFO AUDIT (sitecore\admin): Save item: master:/sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save Actions/Enroll in Engagement Plan, language: en, version: 1, id: {1B8ED61B-5B36-4C49-9736-2C4A87795D71} 10116 21:17:38 INFO AUDIT (sitecore\admin): Save item: master:/sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save Actions/Enroll in Engagement Plan, language: en, version: 1, id: {1B8ED61B-5B36-4C49-9736-2C4A87795D71} 2504 21:17:39 INFO AUDIT (sitecore\admin): Save item: master:/sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save Actions/Enroll in Engagement Plan, language: en, version: 1, id: {1B8ED61B-5B36-4C49-9736-2C4A87795D71} 2504 21:17:44 INFO HttpModule is being initialized 2504 21:17:58 WARN no such user exists Exception: System.InvalidOperationException Message: no such user exists Source: Sitecore.Forms.Custom at Sitecore.Form.Submit.EnrollInEngagementPlan.Execute(ID formid, AdaptedResultList fields, Object[] data) at Sitecore.Form.Core.Submit.SubmitActionManager.ExecuteSaving(ID formID, ControlResult[] list, ActionDefinition[] actions, Boolean simpleAdapt, ID sessionID)
Upvotes: 3
Views: 721
Reputation: 2712
The reason you get that error, is that Webforms are trying to enroll the associated ExternalUser in the engagement plan. Probably your visitor don't have an associated user and that is why you get the error.
Therefore you have two options:
First create a user based on the forms field and then associate that user with the visitor. This could be done in a separate action. After that you can apply your Enroll in Engagement plan action.
Write your own action that will enroll the current visitor in the engagement plan instead. But the entered data is not associated with the visitor in any way.
Upvotes: 5