We send a mail when a customer fill up a simple form. We want to trigger an event if that customer don't open that mail in 7 days. How to achieve this goal in sitecore 9 using marketing automation?
2 Answers
These steps should help you achieve your intentions:
- Add custom submit action to your form which will save contact data (at least email) follow this doc article.
- Create goal and trigger it as another submit action on your form
- Create another goal which you assign when somebody opens page from your link from email (probably you will have link in email)
- Add goal from step 2 as initial event to your Marketing Automation and set rule when this goal is triggered start this marketing automation
- Add another step in Marketing Automation which will listen 7 days to goal from step 3
- If goal is triggered, assign your event as next step; If it's triggered you can assigned different functionality; There will be a yes/no branch in triggered goal condition
You can make a marketing automation outcome like this
then trigger outcome like this
var reference = new IdentifiedContactReference("sitecoreextranet", email);
var existingContact = client.Get<Sitecore.XConnect.Contact>(reference, new ContactExpandOptions(new string[] { DtgoProfileFacet.DefaultFacetKey }));
if (existingContact != null)
{
var channelId = Guid.Parse("{52B75873-4CE0-4E98-B63A-B535739E6180}");
var interaction = new Interaction(existingContact, InteractionInitiator.Contact, channelId, "xConnectIntro Console App");
Guid outcomeId = Guid.Parse("{EB30DE38-B5C7-4256-B720-93145E9E1912}"); // ID of outcome item
var outcome = new Sitecore.XConnect.Outcome(outcomeId, DateTime.UtcNow, "USD", 100.00m);
interaction.Events.Add(outcome);
client.AddInteraction(interaction);
client.Submit();
}
}
This code above for "Yes path". End then you will add another action like send another email for "No path"