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 /
  • API and SDK Questions /
avatar image
Question by andrestallos · Jan 30, 2017 at 05:19 PM · CloudScriptapisscheduled tasks

Scheduled task to update Store

Hello! We would like to set up an scheduled task to change the items of one of the Stores on a daily basis, iterating through a series of preconfigured 'daily deals'. Is there some way to use the 'SetStoreItems' API call from the CloudScript, or are we constrained to using only the server API? If so, is there some workaround we could use? Thank you!

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 Brendan · Jan 30, 2017 at 06:37 PM

At the moment, Tasks are limited to the Server API calls, though we will be exposing Admin functionality for Tasks in a future update. For now, your best approach would be to create the various Stores, and use Title Data to indicate which is the current "live" store.

Comment
andrestallos

People who like this

1 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 andrestallos · Feb 01, 2017 at 11:26 AM 0
Share

Thanks for the quick reply! We've implemented it the way you suggest, creating multiple different stores and using the Task to update the Title Data pointing to the active one, and it all seems to be working just as we wanted. Thank you!

avatar image eswitzer07 · Jan 16, 2019 at 10:12 PM 0
Share

Hey,


Just wanted to "bump" this thread. We are trying to achieve the same functionality as the OP (having a store populated randomly via cloudscript). We have all the functions setup in cloud script to process the data, but we are getting:

"StackTrace": "ReferenceError: admin is not defined\n at handlers.AutoStoreUpdate (F588-main.js:234:21)"

Are tasks still not able to fire off admin API calls? We aim to have quite a few items in game, and hand creating all the stores would be a bit of a time sink for something that could be done automatically via cloudscript.

Cheers!

avatar image Brendan ♦♦ eswitzer07 · Jan 17, 2019 at 03:12 AM 0
Share

Correct - Admin API calls are not supported via Cloud Script. We are planning on adding more options for managing changes to titles for live events in an upcoming sprint though, so I'd keep an eye on our blog for info on that update. For now, you would need to manage this via a local admin tool, or else use the method described above (for a pre-built set of stores).

avatar image Wu Brendan ♦♦ · Aug 31, 2021 at 12:04 AM 1
Share

Almost 5 years later, there is still no possibilities to execute admin api from cloudscript ;)

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

    4 People are following this question.

    avatar image avatar image avatar image avatar image

    Related Questions

    Can Cloud Code Access the Admin API 1 Answer

    Having trouble using httpRequest to access PayPal API 1 Answer

    There is a problem with the certificate when using the container. 1 Answer

    How can I Remove member from Group/Clan using Cloudscript? 1 Answer

    Leaderboard related Questions 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