Federated inventory¶
Federated Inventory allows you to integrate with other third-party inventory systems such as Steam's Inventory or Web3 wallets. Because of this intended usage, all FederatedInventory implementations are also Federated Login implementations.
Here is how this works at a high-level:
- Take a
UBeamItemContentorUBeamCurrencyContentwhosefederationfield has a valid Federation Id - Whenever the inventory is fetched, if that content object is within its scope, the Beamable backend will invoke the
GetInventoryStatecall with the user's third-partyUserIdas its parameter - Whenever an inventory update is committed, any currencies or items involved that are federated are bundled up and passed into
StartInventoryTransaction
Here is some more detail:
- The
idparameter is the UserId thatIFederatedLogin.Authenticategenerates.GetInventoryStatedecorates the response with currencies and item instances and forwards it along, nothing more - The
transactionparameter is an optional string provided by the caller. You are expected to provide an idempotency guarantee that every given transaction string value is only processed once. In most cases, this is a pass-along to Web3 wallets or wherever you are keeping the inventory information. If that is not supported by your third-party, you can use StorageObjects to provide this guarantee
Support in SDK
Support for this federation in the SDK's UBeamInventorySubsystem is coming soon.