To create a campaign template with a scenario, playing content by default, interrupted by targeted content when a face appears, you need to:
1. In Displayforce Designer, create a new template, after specifying its name.
2. Add three components "UI Editor" and "Facial Recognition" controller.
3. On the initial component, specify the link to go to the "Facial Recognition" controller and configure the component depending on the required scenario (make the necessary settings in other components).
4. In the Face Recognition controller, add the required number of events by clicking the "+Event" button. In the current scenario, the setting is made for two events - a man or a woman is standing in front of the camera.
In the right section of the screen we can:
-Set the name of the transition.
-Customize the transition itself, specifying the gender of the person required for the transition, the presence of a smile, or a certain age of the person.
Also, when setting up a transition to targeted content, you can use actions in the Interface Editor.
5. After adding links for components, create return links to the start component.
If the condition for switching to the initial component is the loss of a face in the camera, then the setting must be performed through the "Scenes - Action" tab:
You can also set up a transition to the start component after the content has finished playing. To do this, select the appropriate action "go after playback is complete":
Save and upload the template to the platform. Create a campaign using the created template.
Enable "Non-personalised recognition of face attributes" - "Gender, age" (and other) on the device in Displayforce Player.
Note! The article describes the scenario of the simplest version of the template with gender recognition. In your template, you can expand the number of scripts as needed.