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 /
  • Feature Requests /
avatar image

Martin L suggested an idea · Dec 02, 2016 at 06:50 PM · apis

Extra API call that both purchases an item AND runs a cloudscript

I would like to be able to set custom data when I purchase an item. Currently the only way to do this is to ignore the built in Purchase item API and use a cloud script that contains a Grant Item and Subtract Currency pair, and then set my custom data. It would be great to have an API call that purchased the item and then executed a given cloud script, with the purchased item instance id as an argument to the script.

thub.nodes.view.add-new-comment
Hamza Lazaar
mgambrell
Montana Tuska

People who like this

3 Show 2
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 mgambrell · Jan 20, 2017 at 01:25 AM 0
Share

For reference, here's discussion of the annoying workaround for not having this functionality (make sure you leave the data in a state where it can be finished next time the user logs in, in case he bails in the middle of the purchase) : https://community.playfab.com/questions/521/207389858-Purchase-from-server.html

(3rd time I've posted this, in case anyone wonders what it means when the other 2 posts appear)

avatar image Brendan ♦♦ mgambrell · Jan 20, 2017 at 01:27 AM 0
Share

The lower section ("Post a comment") on an Idea works the same as posting an Answer on a Question in the other forums. Due to issues dealing with spammers, we had to make the settings for AnswerHub put new posts in those categories into a moderation queue for any user with 0 reputation. I've taken care of the other two posts, to prevent confusion.

1 comment

· Add your reply
avatar image

Brendan commented · Jun 06, 2017 at 06:17 PM

To do this, you would use a PlayStream Rule (action trigger) that fires on the player_inventory_item_added, running a Cloud Script that adds the custom data you need (using the information on the item which is available in the context passed into the Cloud Script handler).

thub.nodes.view.add-new-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

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Your Opinion Counts

    We would love to know what you need. Submit your ideas and upvote others to help us prioritize.

    Sign in to post a new idea

    Follow

    Follow This Idea

    1 Person is following this .

    avatar image

    Related Ideas

    Add 'UpdateEmailAddress' to API -- Currently you have to do this manually

    API methods/CloudScript functions to interact with multiple Shared Groups at once

    Server API Allowed to Request Audit History Logs

    RequestMultiplayerServer should return the BuildId used to instantiate the server.

    ClientAPI for changing DisplayName of inventory ItemInstances

    Request WeChat login integration

    Throttle errors to return the time remaining, or the specific limit reached

    Updating PlayFab API for Unreal Engine

    REST API feature to be provided

    Ad Placements dashboard: Show PlacementId & RewardId

    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