In this Tutorial we will create a NPC and if the Player interacts with it, he will open a Shop.
As Shop we will take the Shop from this Tutorial. Of Course you can take your own one.
Create Interactable Actor
You have two Options:
Make a Child of SP8_InteractableActor_Shop.
Create a new Blueprint without a Template.
I will explain both!
Make a Child of SP8_InteractableActor_Shop
1. Create a new Blueprint and select as Class SP8_InteractableActor_Shop.
Do not forget to set the Interaction Profile inside the Blueprint SP8_InteractableActor like descriped inside this Tutorial, if you haven’t done it yet!
2. Create a new GameplayTag and call it Interaction.Types.Shop.
3. Open your new Blueprint and go to the Class Defaults and set your Interactable Actor Type to your new Gameplay Tag.

Create a new Blueprint without a Template
1. Follow this Tutorial.
2. Add the Interface SP8_BPI_Interaction_Shop like you added the SP8_BPI_Interaction.
3. Create a new GameplayTag and call it Interaction.Types.Shop.
4. Edit the following Interface Functions:
SP8_SetCanInteract: Create a new Variable and call it canBeInteracted [Bool]. Set this Variable inside this Function. The Variable should be replicated! Also return true, if it worked!
SP8_CanBeInteracted: Return the Variable canBeInteracted.
SP8_GetInteractionType: Return the Gameplay tag Interaction.Types.Shop.
SP8_getShop: Create a new Variable and call it Shop [Data Table] and set the Variables Expose on Spawn and Instance Editable to true. Return this Variable.


Add the Actor to your Level
1. Simply drag and drop your Blueprint into your Level.
2. Click inside the Outliner of the Level on your Blueprint and inside the Details Panel add to the Variable Shop your Shop Data Table.

Setup the Player
1. Without PlayerTemplate:
Add the Interface SP8_BPI_CanUseShop to your Player BP (Class Settings).
Open the new Interface Function SP8_CanUseShop and do following:
(1) Call GetClosestActorOfType on the Interaction Component.
As Input set the Gameplay Tag Interaction.Type.Shop
(2) Loop trough all Actors.
(3) Call the Interface Function SP8_GetShop on the Actor.
(4) Check if the Data Table was found.
(5) If yes, check if the Data Table is the same as the Input of the Function.
(6) If yes, create a local Variable and set it to true and Break the Loop.
(7) Return the local Variable.

Of course you can customize this Function. We are only checking here, if the Player is close enough to the Shop to purchase Items.
You could put your own logic in front of the Function getClosestActorOfType.
2. With PlayerTemplate:
Overwrite the Function of the PlayerTemplate SP8_Overwrite_CanUseShop and set the returning Boolean to true.

Of course you can put some logic into this Function, to deny Players to use the Shop.
3. Without PlayerTemplate:
You need to listen to the InteractedWithActor Dispatcher of the Interaction Component.
Inside there you need to do following:
First of all check if the Interaction Type is Interaction.Types.Shop.
If yes, you need to call SP8_GetShop on the Actor. Check if it was found.
If yes, call openShop on your Shop Widget.

4. With PlayerTemplate:
Go inside your Player BP to Class Defaults and set the Variable Interaction Type Shop to the Gameplay Tag Interaction.Types.Shop.

5. With PlayerTemplate:
Inside your Shop Widget, you need to listen to the Event openShop (Player BP) and call your open Shop Function.
This should be called, when the Shop Widget is initialized.

6. Listen to an Key Press, which you want to interact with this Actor.
Call InteractWithClosestActor on the Interaction Component and do following:
Interaction Type: Add Interaction.Types.Shop
RunOnServer: Set to false, because it will only open the Shop.

If you move now near your Shop Actor with your Player BP and you press (in this example) on the Key R, you will open your Shop.
Of course only if it is closer then a other Interactable Actor with one of the Types you put into this Function.