Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by anoainteractive · Jan 15, 2020 at 06:05 PM · CloudScriptIn-Game Economy

I want to make a limited item that can be purchase using VC

Hello, I want to make an item that have limited amount so the item can be sold out. But using the limited item feature can only be use for RM. I've tried using custom data in the item and update the amount/custom data by cloud script, but cloud script can't use admin function to update catalog items. What do you think is the best method for this?

Thanks

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Sarah Zhang · Jan 16, 2020 at 05:37 AM

If the “limited item” that you said means all users under the title share one limit of this item. For example, the total number of purchases by all users cannot exceed 10. If so, although items that check [LIMITED EDITION] option can only be purchased by RM, you still can let players purchase such items with VC through some workarounds. A possible workaround is to combine Server API GrantItemsToUser with Server API SubtractUserVirtualCurrency. Limited Items can be granted to users by server or admin API GrantItemsToUser(s), SubtractUserVirtualCurrency can be used to decrement the user's balance of the specified virtual currency by the stated amount. These two Server API can be accessed by CloudScript directly. Then you can write a custom CloudScript function to handle the process of purchase.

If you want that every user has a separate limit of it. For example, everyone can purchase at most 10 items. If so, you can choose “TitleData” to store the “initial limit number”, and choose “Player Read-Only Data” to store the “Items remaining”. Server API GetUserReadOnlyData and UpdateUserReadOnlyData can be used to do the judgment and update the “item remaining”. They also can be used on CloudScript with your custom code logic.

Comment

People who like this

0 Show 4 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image anoainteractive · Jan 16, 2020 at 06:46 AM 0
Share

Thank you for the thought

The limited items is for everyone and I want to show the number of item left. I also thought to use the [LIMITED EDITION] way. But I thought if it can disturb the dashboard/analysis if I use item with RM. Also, if I want to get the items stock, I need to use the admin API in my project. But if there's no other way, I think I'll just stick with your idea.

Thanks

avatar image Sarah Zhang ♦ anoainteractive · Jan 16, 2020 at 08:08 AM 0
Share

Yes, currently, only can use Admin API CheckLimitedEditionItemAvailability to check the global count for the limited edition item. It's not recommended to use it on CloudScript or clients, if you have a custom admin tool, you can use admin API on it. Besides, right now, to manage such global data that need to be updated frequently(more than limited edition item), an external cache like Redis still is a recommended workaround.

avatar image anoainteractive Sarah Zhang ♦ · Jan 16, 2020 at 08:54 AM 0
Share

Hi, I've implemented it and use RM, but I get this OperationNotSupportedForPlatform 1219 when I tried to buy the item. Any idea how to fix this?

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Time Locked Items 3 Answers

    How to get contents from DropTable trough Client API? 1 Answer

    Changing the price of an item using CloudScript? 1 Answer

    Subscriptions in PLayfab... 1 Answer

    Communication with external payment server 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges