Orders and Fulfillment Reference #
Order Provider Plugins #
Provider | Pragma Engine Plugin |
---|---|
Steam | pragma.order.SteamOrderProviderPlugin |
Epic | pragma.order.EpicOrderProviderPlugin |
Twitch | pragma.order.TwitchOrderProviderPlugin |
For providers not listed see Custom Order Provider Plugin.
Order mapping specs #
The following section includes example Order mapping specs for supported providers.
The source types are defined inorderContent.proto
. For more details go tosrc/main/proto/pragma/order/orderContent.proto
.
Steam #
[
{
"skuId": "Steam Ownership Sku Id",
"sources": [
{
"provider": "STEAM",
"steamSource": {
"ownership": {
"appId": "{steamAppId}"
}
}
}
]
},
{
"skuId": "Steam Inventory Sku Id",
"sources": [
{
"provider": "STEAM",
"steamSource": {
"inventory": {
"itemDefId": "{steamItemDefId}"
}
}
}
]
}
]
Epic #
[
{
"skuId": "Epic Ownership Sku Id",
"sources": [
{
"provider": "EPIC",
"epicSource": {
"ownership": {
"audienceItemId": "{epicAudienceId}"
}
}
}
]
},
{
"skuId": "Epic Inventory Sku Id",
"sources": [
{
"provider": "EPIC",
"epicSource": {
"entitlement": {
"audienceItemId": "{epicAudienceItemId}"
}
}
}
]
}
]
Twitch #
[
{
"skuId": "Twitch Drop Sku Id",
"sources": [
{
"provider": "TWITCH",
"twitchSource": {
"rewardId": "{twitchRewardId}"
}
}
]
}
]
Error types #
error type | description |
---|---|
OrderProviderUnexpectedResponseApplicationError | Pragma can’t communicate with the third party provider. This error type contains information on the provider type (Steam, Epic) and the error message received from the third party provider (500 internal service error). |
OrderService_OrderProviderPluginMissing | There is no configured Order Provider Plugin. |
OrderService_OrderStatusUpdateFailed | The order status failed to be updated. |
OrderService_ProviderDetailsUpdateFailed | Failed to update provider details. |
OrderService_OrderNotFound | No orders were found. |
OrderService_InternalError | Order service encountered an issue while processing the request. |
FulfillmentService_ContentValidationError | Invalid content fulfillment mapping specs. |
FulfillmentService_UnexpectedOrderStatus | The order to fulfill has an unexpected order status. |
Data classes #
Orders #
property | description |
---|---|
orderId | Unique identifier for the order. |
pragmaSocialId | Unique social identifier for the player (game agnostic). |
skuId | Unique identifier that Pragma uses to track an item from a third party provider. Ex: SmallGoldBundle |
quantity | Amount of the item in the order. |
providerId | Enum to associate which provider the order came from. |
providerSource | Object containing information about the item from the third party. |
orderStatus | The following are the possible statuses: PENDING , RECEIVED , and REVOKED . |
purchaseDateMillis | Date the item was purchased in milliseconds. |
createdTimestampMillis | Date this order record was created in milliseconds. |
lastUpdatedTimestampMillis | Last updated timestamp the order was altered in milliseconds. |
contentVersion | Version of the OrderMappingsSpecs.json file used when processing the order. |
Fulfillments #
property | description |
---|---|
fulfillmentId | Unique identifier for the fulfillment. |
orderId | Unique identifier for the order. |
pragmaPlayerId | Unique identifier for the player for a particular game. |
skuId | Unique identifier that Pragma uses to track an item from a third party provider. Ex: SmallGoldBundle |
quantity | Amount of the item in the order. |
providerId | Enum to associate which provider the order came from. |
status | The following are the possible statuses: FULFILLED , FULFILLMENT_FAILED , REVOKED , and REVOKED_FAILED . |
createdTimestampMillis | Date this fulfillment was created in milliseconds. |
lastUpdatedTimestampMillis | Last updated timestamp the fulfillment was altered in milliseconds. |
contentVersion | Version of the FulfillmentMappingSpecs.json file used when processing the fulfillment. |