Skip to content

Commit 09c0ec3

Browse files
Elijah ZawatskyCopilot
andcommitted
Add sections for unpackaged app install check and Store PDP open
Add two new sections to the send-requests-to-the-store documentation: - Check if an unpackaged application is installed (requestKind 32, storeAction 0) - Open the Store PDP for a product (requestKind 32, storeAction 1) Co-authored-by: Copilot <[email protected]>
1 parent 13ba4ba commit 09c0ec3

1 file changed

Lines changed: 69 additions & 0 deletions

File tree

uwp/monetize/send-requests-to-the-store.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,75 @@ The following example shows the format of the JSON data to pass to *parametersAs
149149

150150
If there is an error with the request, the [HttpStatusCode](/uwp/api/windows.services.store.storesendrequestresult.HttpStatusCode) property of the [StoreSendRequestResult](/uwp/api/windows.services.store.storesendrequestresult) return value contains the response code.
151151

152+
## Check if an unpackaged application is installed
153+
154+
This request checks if an unpackaged application is installed for the current user or at the machine level.
155+
156+
To send this request, pass the following information to the *requestKind* and *parametersAsJson* parameters of the **SendRequestAsync** method.
157+
158+
| Parameter | Description |
159+
|----------------------|---------------|
160+
| *requestKind* | 32 |
161+
| *parametersAsJson* | Pass a JSON-formatted string that contains the data shown in the example below. |
162+
163+
The following example shows the format of the JSON data to pass to *parametersAsJson*. The *storeAction* field must be assigned the integer 0. The *productId* field must be assigned a string with the productId of the unpackaged application to make the request for.
164+
165+
```json
166+
{
167+
"storeAction": 0,
168+
"productId": "Product ID"
169+
}
170+
```
171+
172+
After you submit this request, the [Response](/uwp/api/windows.services.store.storesendrequestresult.Response) property of the [StoreSendRequestResult](/uwp/api/windows.services.store.storesendrequestresult) return value contains a JSON-formatted string with the following fields.
173+
174+
| Field | Description |
175+
|----------------------|---------------|
176+
| *isInstalled* | A Boolean value, where **true** indicates that the product is installed on the device and **false** indicates that the product is not installed. |
177+
178+
The following example demonstrates a return value for this request.
179+
180+
```json
181+
{
182+
"isInstalled": false
183+
}
184+
```
185+
186+
If there is an error with the request, the [ExtendedError](/uwp/api/windows.services.store.storesendrequestresult.ExtendedError) property of the [StoreSendRequestResult](/uwp/api/windows.services.store.storesendrequestresult) return value contains the error code.
187+
188+
## Open the Store PDP for a product, automatically install the product
189+
190+
This request opens the store to the page of the product indicated. It allows optionality for kicking off installation of that product and automatically opening the product once installation completes. Note that if the product is already installed, this will not open the product.
191+
192+
To send this request, pass the following information to the *requestKind* and *parametersAsJson* parameters of the **SendRequestAsync** method.
193+
194+
| Parameter | Description |
195+
|----------------------|---------------|
196+
| *requestKind* | 32 |
197+
| *parametersAsJson* | Pass a JSON-formatted string that contains the data shown in the example below. |
198+
199+
The following examples show the format of the JSON data to pass to *parametersAsJson*. The *storeAction* field must be assigned the integer 1. The *productId* field must be assigned a string with the ProductId of the application, or the *packageFamilyName* must be assigned a string with the PackageFamilyName of the application. Optionally, *autoInstall* can be assigned a Boolean indicating if the application should be auto-installed on PDP open. *autoOpenOnInstallComplete* can be assigned a Boolean indicating if the application should open after installation, but can only be set to **true** if *autoInstall* is set to **true**. Note that the application will not open if it is already installed before the call is made.
200+
201+
```json
202+
{
203+
"storeAction": 1,
204+
"productId": "9pb2mz1zmb1s",
205+
"autoInstall": true,
206+
"autoOpenOnInstallComplete": true
207+
}
208+
```
209+
210+
or
211+
212+
```json
213+
{
214+
"storeAction": 1,
215+
"packageFamilyName": "AppleInc.iTunes_nzyj5cx40ttqa"
216+
}
217+
```
218+
219+
If there is an error with the request, the [ExtendedError](/uwp/api/windows.services.store.storesendrequestresult.ExtendedError) property of the [StoreSendRequestResult](/uwp/api/windows.services.store.storesendrequestresult) return value contains the error code.
220+
152221
## Related topics
153222

154223
* [Show a rating and review dialog in your app](request-ratings-and-reviews.md#show-a-rating-and-review-dialog-in-your-app)

0 commit comments

Comments
 (0)