Tutorial: your first scenario
In this tutorial you’ll build the smallest scenario that does something: a visitor checks in at a checkpoint by scanning a QR code, and the checkpoint counts the visit. It takes about 15 minutes.
Along the way you’ll use the main parts of ActualityPI: a template (the design), a scenario (one run of that design), and a touchpoint (the QR code people scan).
You’ll need:
- An ActualityPI account.
- The app on your phone. It also works in a web browser, but scanning is easiest with a phone.
- Ideally a second screen, such as a laptop, to show the QR code on. If you only have one device, there’s a way around that in step 9.
1. Create a template
Section titled “1. Create a template”A template is the design for a scenario: what’s in it and what people can do.
-
Open the Scenarios tab, then tap Templates at the top.
-
Tap Create your first template, or Create a blank template if the app also offers ready-made ones. (If you already have templates, tap the + button instead.)
The app creates a draft straight away, named “Template” followed by a short code.
-
Tap that name at the top of the template, type
My first scenario, and press return or tap away to save it.
2. Add a visitor and a checkpoint
Section titled “2. Add a visitor and a checkpoint”Everything in a scenario is an entity: people, items, places. You describe each kind of entity with an entity template.
-
On the template, tap the arrow on the Definitions card to open it. Next to Entity templates, tap New.
-
Fill in the form:
- Name:
Visitor - Initial instances and Maximum instances: leave both at
1. - Who controls it: choose Participants claim. This lets you take control of the visitor once you’ve joined.
- Name:
-
Tap Save.
-
Tap New next to Entity templates again and make a second one:
- Name:
Checkpoint - Initial instances and Maximum instances: leave both at
1. - Who controls it: choose Nobody. A checkpoint is a place, so no one controls it.
- Name:
-
Tap Save, then close the editor.
3. Give the checkpoint a counter
Section titled “3. Give the checkpoint a counter”An attribute is a value an entity holds. You’ll give the checkpoint a number that counts its visits.
- In Definitions, tap New next to Attributes.
- Set Name to
Visits. Leave everything else as it is: a number with Min0, Max100and Default0. - Tap Save, then close the editor.
- Open the Checkpoint entity template: in Definitions, tap Entity templates, then Checkpoint. In its Attributes card, tap + Visits, then Assign.
4. Create the “Check in” action
Section titled “4. Create the “Check in” action”An action is something an entity can deliberately do. Here the visitor checks in at the checkpoint, which adds one to its visits.
-
In Definitions, tap New next to Actions.
-
Set Name to
Check in. Do this first, because the sentence below uses the name.The action is written as a sentence, and you change it by tapping its highlighted words. It starts as “Anyone may use Check in on 1 target, aimed at anyone.”
-
Tap Anyone. In the card that asks Who may use Check in?, tap anyone, choose is a kind, and pick Visitor.
-
Leave the 1 as it is: the action has one target.
-
Tap anyone at the end of the sentence. In the card that asks Who can Check in be aimed at?, tap anyone, choose is a kind, and pick Checkpoint.
The sentence now reads “Any Visitor may use Check in on 1 target, a Checkpoint.”
-
Under Effects, tap Add effect and choose Change an entity’s attribute. Its sentence starts as “Set an attribute of the target to 0”.
- Pick Visits.
- Tap the 0, choose increase by, and enter
1. - Leave the target as it is: that’s the checkpoint.
When it reads “Increase Visits of the target by 1”, tap Add.
-
Tap Save.
Now give the action to the visitor:
- Open the Visitor entity template.
- In its Actions card, tap + Check in.
- Leave How Check in is performed as Directly, and tap Assign.
5. Publish the template
Section titled “5. Publish the template”You can’t run a draft. Publishing locks its design so scenarios can run it.
- Go back to the template and tap Publish draft.
- When it’s done, the template shows as Published and the button changes to Create scenario.
6. Make a QR code
Section titled “6. Make a QR code”A touchpoint is something people scan to interact with a scenario. You create it once and can reuse it.
- Open the Touchpoints tab and tap Create your first touchpoint, or the + button.
- Leave Type as QR code. Set Name to
Front door. - Tap Save.
The touchpoint page shows the QR code. Use Download to print it, or open the same page on your second screen.
7. Create the scenario and get it ready
Section titled “7. Create the scenario and get it ready”-
Go back to your template and tap Create scenario.
-
Give it a name if you like, and tap Create.
The scenario opens. Its Entities card already lists one Visitor and one Checkpoint, made from your template.
-
Tap Join as participant. As the scenario’s owner you manage it, but you need to join to take part.
-
In the Entities card, under You can claim, tap Claim next to the Visitor. You now control the visitor.
-
Open the checkpoint: in the Entities card, tap Checkpoint, then the checkpoint in the list. Under Touchpoints, tap Add touchpoint. The camera opens: scan the Front door QR code, or tap Choose from your touchpoints, choose Front door, and tap Assign.
8. Start the scenario
Section titled “8. Start the scenario”- On the scenario page, the start card should say “Ready to start — every start rule is met.”
- Tap Activate scenario.
The scenario is now live, and its touchpoints start responding to scans.
9. Scan the QR code
Section titled “9. Scan the QR code”- Tap the Scan button in the middle of the navigation bar. Allow camera access if asked.
- Tap Record, then point your phone at the QR code. It recognises the code by itself. Tap Submit.
- The Activation screen lists what you can do. You’ll see one option: Visitor → Check in → Checkpoint. Tap Execute.
- When it says “Command succeeded.”, tap View scenario.
The scenario’s Timeline now tells the story:
- You scanned Checkpoint.
- You used Check in on Checkpoint.
- Checkpoint’s Visits went from 0 to 1.
Scan again and the visits go up again.
If you see “No options”
Section titled “If you see “No options””“Nothing can respond to this scan right now” means the scan reached the scenario but nothing could act on it. Check that:
- The scenario is live: you tapped Activate scenario.
- You joined the scenario and claimed the Visitor.
- The Front door touchpoint is assigned to the Checkpoint.
- The Check in action is assigned to the Visitor entity template.
If the template needs fixing, you’ll need a new draft: published templates can’t be changed, and a running scenario keeps the version it started with.
Still stuck? Contact support.