Parameters and Instances
Features | Description | Screenshots |
Parameters and instances | Interactions can include parameters that define instances of the interaction. This allows a single interaction to have multiple variations, which the client can select from the interaction screen (for the interactions with initiation media “Button”) or by scanning a QR code (for the interactions with initiation media “QR“). For example, an interaction“Open Door” could have different instances - “1,” “2,” and “3.” As a result, your client (an app user) will have to select the intended goal: “Room 1,“ “Room 2,“ or “Room 3.“ |
|
Add parameter
|
Before add parameters and instances to the interaction, the interaction must first be saved. Click “Edit“ icon next to the interaction’s name (“Interactions“ page). Navigate to the “Advanced Settings” section on the “Edit interaction” page and click the “Parameters” area. | |
| The "Add Parameters & Instances" pop-up window will appear. Click on the "Parameters" tab. Click the "+ Parameter" button. The box with the "Name" and "Value" fields will appear. In the relevant fields, give the parameter a name and a default value (optional). A single interaction might have several parameters. | |
Create, edit or hide an interaction instance
| If you want to add or edit instances follow the next steps:
If the interaction’s initiation media is “Button,” the mobile app user will need to select a specific instance before initiating this interaction. If the interaction's initiation media set to “QR”, the mobile app user will scan a QR code, automatically initiating a particular instance of the interaction. For example, the goal of the interaction is to enable a hotel guest to access their room by scanning a QR code. In this case, the interaction initiation media should be set as "QR," and the instance parameter name should be "Room." The instance parameter values should be "1", "2", and "3," resulting in instances of this interaction being named "Room 1," "Room 2," and "Room 3," respectively. In order for a hotel guest to be able to open only one particular room, it is necessary to set the predicate upon the attribute of the required credential. In this case, the predicate could be: The value of the attribute named "Room" {number} of the required credential “Key” is equal to the value of the instance of the “Room“ parameter of this interaction (Room 1 = Room 1 is true). More information about predicates can be found in the “Add predicates“ section of the “https://proofspace.atlassian.net/wiki/spaces/PSM/pages/2223407136 “ page. |
|
| Set the instance's active time interval (optional). The client will be unable to interact with this instance once this period has passed. | |
Edit an interaction instance | By clicking on the “Edit“ button, instances can be edited. | |
Hide an interaction instance | Saved instances can not be deleted. If, for any reason, you don't need an existing instance in your interaction, you can hide it from the app user. Click on the "Hide "button (icon) next to the selected instance in the "Add Parameters & Instances" pop-up window. Then click "Submit "and "Done" to save changes in this interaction. After hiding an instance, it will no longer be visible in the App. This setting can be helpful if there are many instances in your interaction and you want to simplify the user experience by displaying only the most commonly used ones. | |
| Once all the details have been added, click the "Submit" button. The parameters and instances have been defined and added. Click “Done“ to save all changes in this the interaction. |