# User Documentation

# 📎 NFC Events

Create unique NFC product tag URLs, custom user roles, NFC pages and blocks, allow specific users to create events by scanning NFC tags, manage all events and their attachments and more.

# Getting started

To install NFC Events plugin follow the following instructions.

- In your WordPress admin panel, go to Plugins > New Plugin, search for NFC Events and click “Install now” from the search results page.

- Alternatively, download the plugin from WordPress.org manually and upload the contents of nfc-events.zip to your plugins directory.

- Activate the plugin

- Navigate to plugins settings page within WP Dashboard > NFC Events > Settings.

- Export your NFC Tag URLs and you will then have a CSV file with all the products unique tag urls. You can then use those url’s straight away by using any of them within your browser or placing an url onto a tag and scan it with your mobile device.

# Redirection

Not logged-in users Upon successful scan of NFC tag and its arrival on the site, user will be redirected to a product page where will be prompted with a notification popup to login. Upon successful login the user will be automatically redirected the same way as logged-in users described below.

Logged-in users Upon successful scan of NFC tag, user will be redirected to the specific NFC page based on his/her user role.

# Creating an Event

After user is redirected to the “Set event” page, the event form will be displayed where the user can submit an event with specific status, leave a comment and attach files/images.

Upon submitting the event form, an event is created within WP dashboard with all the details from the form such as:

- Product ID (from which we can get product name and all other details)

- Chosen status (washing or damaged etc.)

- User ID (from which we can get all user information such as its role, email address etc.)

- Date and time of form submission.

- Any attachments (if any were submitted).

# Create User Roles

The NFC plugin has the ability to create custom roles and also archive any of them for later use and to delete previously created ones.

Within dashboard navigate to NFC Events > Settings > Roles:

The NFC plugin has the ability to create custom roles and also archive any of them for later use and to delete previously created ones.

Within dashboard navigate to NFC Events > Settings > Roles:

These custom user roles then can be used within Event Statuses to limit which status can be available for which user role. For example “Warehouse” user role can have only “Washing” and “Returned” statuses which mean when the user with a role of “Warehouse” logs into the site and tries to submit an event form they will only have a choice between those two statuses.

# Create User Pages

The NFC plugin has the ability to create custom NFC pages that can be used within NFC settings to set specific pages for different user roles. Those users can be redirected to those specified pages upon NFC tag scan.

To create an NFC page navigate to NFC Events > Pages > Add new.

NFC pages can contain any kind of content (blocks) but you will probably use some of the NFC blocks such as: NFC product title, product image, event form etc.

To set which user role will be redirected to which page, navigate to NFC Events > Settings > Redirections:

# Add Blocks to User Pages

With NFC plugin you get access to NFC blocks which you can use within NFC pages or regular WordPress pages or posts. You can find all the NFC blocks within Gutenberg page build block inserter.

To add a NFC block, as any other block, within Gutenberg editor you can click on the + icon to display the block search box and type in “NFC”. All the NFC blocks will be displayed after few seconds and you can add any of them with a simple click.

# Set restrictions

NFC pages can be restricted for specific user roles only. Within each NFC page, on the right side panel you will find “Allowed user roles” settings fields for you to select which user roles are allowed to view the page.

If no user roles are selected, the page will be available for all.

In a case when for some reason a not-allowed user comes to the page url, they will be redirected to the home page instead.

The NFC plugin also has a block called “Restricted content” which allows you to wrap any kind of content inside it and specify that only certain users can view its content.

# Event form block preview as other user role

The “NFC Product Event” block has and option to preview it as some other user role then yours. To do this, navigate to any NFC page within WP dashboard and if you already have the block present on that page, click on the block and if not then simply add “NFC Product Event” block to that page.

Clicking on the block with display the block options on the right side panel:

Click on the “Preview the form as user role” dropdown and choose the role.

The form will then display as that user role will see it. The statuses will change according to what that specific user role can have. For example the “Repairman” user role can have statuses “Returned and Washing” only. This option exists only for site admin/shop manager to use in order to check which statuses the form will show for different user roles.