There are three steps to setting up gift cards: creating the gift card object, creating the gift card vendor, and creating the gift card redemption terminal. Here's some things you should be aware of before starting to create your gift card system:
- The object given to the customer (which doesn't have to be a "card" per-se, it can be anything you design) must have NoMod/NoCopy/Transfer permissions.
- When the customer begins the transaction of purchasing a gift card, they will be given an inactive card which they then activate by paying for. The inactive card cannot be used in any way, so don't worry about people getting inactive cards from your gift card vendor.
- After a card is activated, the customer may then give it away to anyone. The recipient may give the card away yet again, and so on.
- The final owner of the card brings the card to the store in order to redeem the card for store credit. After the card is redeemed, the card is then worthless, and can be deleted.
- As the store owner, you can get purchase and redemption information from a card.
Decide on Your Approach
In general, there are two basic approaches to how you can sell your gift cards:
One Vendor - Many Cards
Using this approach, you create one vendor, and allow the customer to select from gift card denominations that you specify. You can also (optionally) allow the customer to enter their own amount, with a minimum price that you specify. This approach allows you to create one single gift card object, and all customers get the same object, regardless of the denomination of card they purchase. A customer would begin by clicking on the vendor, no matter what denomination they intended to purchase.
One Vendor - One Card
Using this approach, you would create one vendor for each card denomination you want to sell. For example, a store owner might create 3 gift card vendors (that might look like gift cards themselves), one for L$100, one for L$500, and one for L$1000. With this setup, a customer begins by clicking the vendor that represents the denomination they wish to purchase. Using this approach, you could create separate gift cards for each denomination, and design them to reflect that denomination.
Constructing the Gift Card
As mentioned, your gift card can be anything you design. There are only two requirements that the system imposes:
- The gift card object must be at least two prims.
- The Description field of the 2nd prim in the link set must be blank.
If you have no need for multiple prims (e.g. you're making a traditional card-looking object that only needs one prim) you must still use 2 prims to create the gift card. The 2nd prim doesn't need to be visible, so you're welcome to bury the 2nd prim inside the root prim, make it transparent, etc, etc. But at least two prims are required.
A note about blank description fields. The way to ensure that your 2nd prim has a blank description field is to rez a brand new prim, and then do not touch or edit the description field. It is not currently possible to erase the contents of a prim's description field using your viewer, once you put anything in it. So to be safe, rez a new prim, and use that.
The steps to building a gift card are:
- Built and texture your card object however you want.
- Place the gift card script into the card object
- Change the gift card script's permissions to NoCopy
- Change the gift card object's permissions to NoMod/NoCopy/Xfer
- Take the card object into your inventory
Constructing the Gift Card Vendor
Each gift card vendor (which can be any object/linkset you design) must contain 3 items:
- The gift card you've designed
- A config notecard
- The gift card vendor script
Here is a sample config note card that would create a "One Vendor - Many Cards" type vendor, as described above:
prices=100,500,1000 allowcustomprice=y minprice=100
These settings allow a customer to select from a preset list of card denominations, or enter their own value, as long as it's over L$100.
This sample shows the other type of gift card vendor:
Since there is only one value listed on the "prices" line, the customer does not select a denomination, and since the value of "allowcustomprice" is "n" the customer is not allowed to enter their own value either. (Note that the "minprice" line isn't needed if allowcustomprice is disabled).
Constructing the Gift Card Redemption Terminal
This can be any object you create, and only needs to contain the gift card redemption script. There are no configuration options needed.