Skip to content

Commit 52585e1

Browse files
committed
v1.1.0 - Create PDP XSD for IAP's, and add New-IapSubmissionPackage
* Added new PDP schema and example file for IAP's and updated the corresonding PDP.md documentation. * Adds ConvertFrom-ExistingIapSubmission.ps1, mirroring ConvertFrom-ExistingSubmission.ps1, to auto-generate the IAP PDP set from an existing publishing or pending submission. * Added the ability to generate a new IAP StoreBroker configuration file based on a default config file, as well as based on a current submission for that IAP, similar to what we do for applications. * Added New-InAppProductSubmissionPackage to generate a StoreBroker payload from a config file and IAP PDP's (and optional icons). * Updated PackageTool's Resolve-PackageParameters helper method to optionally skip a list of parameters so that the same method could be used for both packaging commands since they're so similar, even though IAP's don't use appx packages. * Updated Update-InAppProductSubmission to do a similar iapId check of the commandline vs the payload's json value, similar to what we do for Update-ApplicationSubmission. * Updated SETUP.md and USAGE.md documentation to reflect these changes, and removed the note in README.md that this work hasn't been done yet. Additionally: * Fixed telemetry property typos for Iap's (referencing an Iap property instead of IapId), along with other AppId->IapId references for the IAP methods. * Fixed documentation example typo in ConvertFrom-ExistingSubmission.ps1 * Minor related Comment-Based-Help (CBH) changes to PackageTool.
1 parent 92a273f commit 52585e1

16 files changed

+2161
-177
lines changed

Documentation/PDP.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* [Sections](#sections)
1010
* [Screenshots and Captions](#screenshots-and-captions)
1111
* [Folder Structure](#folder-structure)
12+
* [Icons](#icons)
1213
* [Schemas And Samples](#schemas-and-samples)
1314
* [Loc Attributes and Comments](#loc-attributes-and-comments)
1415
* [Marking A String To Not Be Localized](#marking-a-string-to-not-be-localized)
@@ -43,6 +44,8 @@ localize the relevant content.
4344
The main sections that you'll find in the PDP (depending on which schema version is in use)
4445
are as follows:
4546

47+
**For Application Submissions**
48+
* AppStoreName
4649
* Keywords
4750
* Description
4851
* ReleaseNotes
@@ -55,12 +58,19 @@ are as follows:
5558
* SupportContactInfo
5659
* PrivacyPolicyURL
5760

61+
**For In-App Product (IAP) ("add-on") Submissions**
62+
* Title
63+
* Description
64+
* Icon
65+
5866
These should map fairly clearly to the sections you're already familiar with in the DevPortal.
5967
For additional requirements on number of elements or length of individual elements, refer to
6068
the schema (or sample file).
6169

6270
### Screenshots and Captions
6371

72+
> Only relevant for Application submissions
73+
6474
It's worth a little bit of additional time to explain how screenshots and captions work.
6575

6676
The DevPortal has different screenshot sections per platform, and you need to specify a caption
@@ -103,17 +113,33 @@ where:
103113
looking recusively for the specific filename
104114
* `img.png`: the filename that you specified in the caption's platform-specific image attribute
105115

116+
### Icons
117+
118+
> Only relevant for In-App Product (IAP) ("add-on") submissions
119+
120+
Unlike screenshots, icons have no associated captions with them. However, it is possible that
121+
your IAP may need to use a different icon based on the region (maybe a different symbol or color
122+
is needed based on that region's culture), and so the icon is part of the PDP.
123+
124+
The only thing that can be specified for the Icon is the filename of that icon. It is expected
125+
that the filename will be found within the defined [folder structure](#folder-structure).
106126

107127
----------
108128

109129
## Schemas and Samples
110130

111-
At this time, StoreBroker only has a single PDP schema in use:
131+
At this time, StoreBroker has two PDP schemas in use:
112132

133+
### Application Submissions
113134
* **Uri**: `http://schemas.microsoft.com/appx/2012/ProductDescription`
114135
* **XSD**: [PDP\ProductDescription.xsd](..\PDP\ProductDescription.xsd)
115136
* **Sample XML**: [PDP\ProductDescription.xml](..\PDP\ProductDescription.xml)
116137

138+
### In-App Product (IAP) ("add-on") Submissions
139+
* **Uri**: `http://schemas.microsoft.com/appx/2012/InAppProductDescription`
140+
* **XSD**: [PDP\InAppProductDescription.xsd](..\PDP\InAppProductDescription.xsd)
141+
* **Sample XML**: [PDP\InAppProductDescription.xml](..\PDP\InAppProductDescription.xml)
142+
117143
----------
118144

119145
## Loc Attributes and Comments

Documentation/SETUP.md

Lines changed: 112 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
* [Getting Your PDPs](#getting-your-pdps)
2424
* [Collecting Your Screenshots](#collecting-your-screenshots)
2525
* [Getting Your Config](#getting-your-config)
26+
* [IAP Setup](#iap-setup)
27+
* [Getting Your IapId](#getting-your-iapid)
28+
* [Getting Your IAP PDPs](#getting-your-iap-pdps)
29+
* [Collecting Your Icons](#collecting-your-icons)
30+
* [Getting Your IAP Config](#getting-your-iap-config)
2631
* [Other Convenience Changes](#other-convenience-changes)
2732
* [Using StoreBroker](#using-storebroker)
2833

@@ -196,7 +201,7 @@ to authenticate against the developer account that you are trying to modify.
196201

197202
#### Getting Credentials
198203

199-
>  You only need to perform this task once per user. You'll re-use these credentials as if they
204+
> You only need to perform this task once per user. You'll re-use these credentials as if they
200205
> were your username and password.
201206
202207
First you have to get three key pieces of information:
@@ -393,11 +398,12 @@ Every project should have its own StoreBroker config file. The config file has
393398
to name this file whatever you want).
394399

395400
2. Once you have the config, review all of the app properties at the bottom half of the file.
396-
These are the values for these properties as they are configured for your app in the store today.
397-
Some users have realized that the values in the store (and thus in this file) are not what they
401+
These are the values for these properties as they are configured for your app in the Store today.
402+
Some users have realized that the values in the Store (and thus in this file) are not what they
398403
expected, so it's worth checking them here and fixing them if need be. (If you do change any of
399-
these properties, you'll need to use the appropriate _switch_ to the `Update-ApplicationSubmission`
400-
later on to make sure that your changes are applied).
404+
these properties, you'll need to use the appropriate _switch_ to
405+
[`Update-ApplicationSubmission`](USAGE.md#creating-a-new-application-submission) later on
406+
to make sure that your changes are applied).
401407

402408
3. Now you need to set the `New-SubmissionPackage` parameter values at the top half of the file.
403409
These parameter values are very well documented within the config file, but here's an additional
@@ -481,6 +487,105 @@ Every project should have its own StoreBroker config file. The config file has
481487

482488
4. [Optional] Check this file in side-by-side with your code for version control support.
483489

490+
----------
491+
492+
## IAP Setup
493+
494+
The [prerequisites](#prerequisites) and [authentication steps](#authentication) are identical here
495+
as they are for applications (as explained above), and so they will not be repeated here.
496+
497+
### Getting Your IapId
498+
499+
The next steps require you to know the IapId for the In-App Product ("add on") that you are trying
500+
to use with StoreBroker.
501+
502+
To run the next command, you'll need your [AppId](#getting-your-appid) from above.
503+
Run the following and get the `ID` that is shown there (it looks like this: `0ABCDEF12345`).
504+
That's your `IapId`.
505+
506+
Get-ApplicationInAppProducts -AppId <appId> -GetAll | Format-ApplicationInAppProducts
507+
508+
> The Windows Store Submission API does not currently support IAP's that are "Store Managed Consumables."
509+
> You will not be able to use StoreBroker to manage that type of IAP until the API has been updated.
510+
> Additionally, if your application _has_ one of those IAPS's, the above command will fail with
511+
> a `409` error. In this scenario, you'll need to manually get the `IapId` by copying it from the
512+
> URL of the Dev Center web portal when trying to edit that IAP.
513+
514+
### Getting Your IAP PDPs
515+
516+
A major benefit of using the StoreBroker to do your updates, is that it can submit all of the
517+
metadata (title, description, icons, etc...) automatically.
518+
However, in order to create the "payload" (json and zip) required to use the API, it needs to have
519+
a uniform way of getting that metadata content.
520+
521+
Enter the [PDP](PDP.md) XML format. PDP stands for Product Description Page, and the PDP.xml file
522+
is a schema that Microsoft uses internally to store all of the localizable metadata for an
523+
In-App Product. That XML file then gets localized into every language that the application has a
524+
Store listing for.
525+
526+
> You don't _have_ to use PDP files to store your metadata in the event that you already have a
527+
> different method of localization. However, if you don't choose to use the PDP format, then
528+
> you will have to write your own version of `New-InAppProductSubmissionPackage` in order to
529+
> create the payload (json and zip) that the other StoreBroker commands require.
530+
531+
You can read [PDP.md](PDP.md) for greater detail on PDP files. Right now, we just need to get you
532+
started by generating your IAP's PDP files based on your current published (or pending) submission.
533+
534+
.\Extensions\ConvertFrom-ExistingIapSubmission.ps1 -IapId <iapId> -Release <release> -PdpFileName <pdpFileName> -OutPath <outPath>
535+
536+
Where:
537+
* `<iapId>` is your IAP's ID.
538+
539+
* `<release>` is the name of this release. Many teams name their releases as `YYMM`
540+
(depending on how often they release). This value will be added to each of the PDP's that are
541+
generated, and will impact the expected location of the screenshots being referenced. More on
542+
that folder structure in the [next section](#getting-your-config).
543+
544+
* `<pdpFileName>` - The name you want to give to the PDP files -- people often use `PDP.xml`.
545+
546+
* `<outPath>` - The folder that the PDP files should be stored in. _Langcode_ sub-folders will
547+
be created for storing the PDP files, as `New-InAppProductSubmissionPackage` depends on
548+
that folder structure for determining what _langcode_ a PDP file is associated with.
549+
550+
#### Collecting Your Icons
551+
552+
The API does not provide any ability to download the existing icons for an IAP listing. When
553+
the script completes, it will tell you what icons it expects you to gather up manually, and the
554+
folder structure that you should be putting them in to.
555+
556+
### Getting Your IAP Config
557+
558+
Every IAP should have its own StoreBroker config file. The config file has two parts to it:
559+
560+
* The top part lets you specify parameters to `New-InAppProductSubmissionPackage` that remain
561+
static, so that you don't have to specify them at the commandline each time.
562+
* The bottom part lets you specify In-App Product submission properties that generally remain static
563+
between submissions and aren't localized.
564+
565+
#### IAP Config Setup Steps
566+
567+
1. Now run `New-StoreBrokerInAppProductConfigFile -Path $home\desktop\SBConfig.json -IapId <IapId>`,
568+
substituting in your [IapId](#getting-your-iapid), and that will generate a pre-populated config
569+
file to your desktop, based on the current configuration of your IAP in the Store. (Feel free
570+
to name this file whatever you want).
571+
572+
2. Once you have the config, review all of the properties at the bottom half of the file.
573+
These are the values for these properties as they are configured for your IAP in the Store today.
574+
Some users have realized that the values in the Store (and thus in this file) are not what they
575+
expected, so it's worth checking them here and fixing them if need be. (If you do change any of
576+
these properties, you'll need to use the appropriate _switch_ to
577+
[`Update-InAppProductSubmission`](USAGE.cmd#iap-commands) later on to make sure that your
578+
changes are applied).
579+
580+
3. Now you need to set the `New-InAppProductSubmissionPackage` parameter values at the top half
581+
of the file. These parameter values are very well documented within the config file, but for
582+
more detailed information on what you'll _likely_ want to change, refer to **step 3** in
583+
[Config Setup Steps](#config-setup-steps) above.
584+
585+
4. [Optional] Check this file in side-by-side with your code for version control support.
586+
587+
----------
588+
484589
## Other Convenience Changes
485590

486591
Well, you did it. You're now _fully_ setup to start using StoreBroker.
@@ -505,6 +610,8 @@ While not required, there are other things that you can do to make your usage ev
505610
create global variables to reference other common Ids (flightId, IapId), paths (like the path to
506611
your StoreBroker config file), etc...
507612

613+
----------
614+
508615
## Using StoreBroker
509616

510617
To learn how to use StoreBroker now that it's all setup, head on over to [README.md](../README.md).

Documentation/USAGE.md

Lines changed: 59 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* [Logging](#logging)
1010
* [Common Switches](#common-switches)
1111
* [Accessing the Portal](#accessing-the-portal)
12-
* [Creating Your Payload](#creating-your-payload)
12+
* [Creating Your Application Payload](#creating-your-application-payload)
1313
* [Creating A New Application Submission](#creating-a-new-application-submission)
1414
* [The Easy Way](#the-easy-way)
1515
* [Manual Submissions](#manual-submissions)
@@ -20,6 +20,7 @@
2020
* [Flighting Commands](#flighting-commands)
2121
* [In App Products](#in-app-products)
2222
* [IAP Overview](#iap-overview)
23+
* [Creating Your IAP Payload](#creating-your-iap-payload)
2324
* [IAP Commands](#iap-commands)
2425
* [Using INT vs PROD](#using-int-vs-prod)
2526
* [Telemetry](#telemetry)
@@ -95,7 +96,7 @@ to the appropriate page on the dev portal for what you're looking for, make use
9596
you'll be taken to the page where you can view/edit the flight that the flight submission is
9697
associated with.
9798

98-
## Creating Your Payload
99+
## Creating Your Application Payload
99100

100101
In StoreBroker, a "payload" is a combination of a json file and a zip file. The **json** file
101102
has the entire content of a Windows Store Submission. This content _could_ be submitted as-is,
@@ -115,7 +116,7 @@ following the instructions in [SETUP.md](SETUP.md):
115116
116117
Generating the submission request JSON/zip package is done with
117118

118-
New-SubmissionPackage <config-path> -PDPRootPath <path> [[-Release] <string>] -PDPInclude <filename> [-PDPExclude <filename>] -ImagesRootPath <path> -AppxPath <full-path>[, <additional-path>]+ -OutPath <output-dir> -OutName <output-name>
119+
New-SubmissionPackage -ConfigPath <config-path> -PDPRootPath <path> [[-Release] <string>] -PDPInclude <filename> [-PDPExclude <filename>] -ImagesRootPath <path> -AppxPath <full-path>[, <additional-path>]+ -OutPath <output-dir> -OutName <output-name>
119120

120121
> Items in brackets ('[]') are optional.
121122
@@ -474,7 +475,7 @@ submissions).
474475
**Return Values**:
475476
`Update-ApplicationFlightSubmission` returns back two values to you at its completion:
476477
the new submission id, and the UploadURL. You can use that UploadUrl to upload your submission's
477-
.zip with `Upload-SubmissionPackage`, in the event that you didn't specify the `PackagePath`
478+
.zip with `Upload-SubmissionPackage` in the event that you didn't specify the `PackagePath`
478479
or want to upload it again.
479480

480481
#### Other Common Flight-related Tasks:
@@ -534,20 +535,57 @@ In-App Products (IAP's) are additional features that are offered to users of you
534535
In the Store, IAP's are considered siblings to Applications, as opposed to children,
535536
because the same IAP can be associated with more than one Application.
536537

537-
### IAP Commands
538+
### Creating Your IAP Payload
539+
540+
> These instructions very closely mirror those for [Creating Your Application Payload](#creating-your-application-payload),
541+
> by design.
542+
543+
In StoreBroker, a "payload" is a combination of a json file and a zip file. The **json** file
544+
has the entire content of a Windows Store Submission. This content _could_ be submitted as-is,
545+
but usually only selected portions of it are "patched" into a new submission. The **zip** file
546+
usually has the icons for the localized listings, although depending on how you create your payload,
547+
those might be missing.
548+
549+
To create your payload, you need to have the following (which you should already have from
550+
following the instructions in [SETUP.md](SETUP.md):
551+
* [StoreBroker config file](SETUP.md#getting-your-iap-config)
552+
* [PDP files](SETUP.md#getting-your-iap-pdps)
553+
* Icons (if you use them in your listing)
554+
555+
> In order to use New-InAppProductSubmissionPackage, it is highly recommended that you read the
556+
> documentation (`Get-Help New-InAppProductSubmissionPackage -Full`) and read the
557+
> documentation in the configuration file.
558+
559+
Generating the submission request JSON/zip package is done with
560+
561+
New-InAppProductSubmissionPackage -ConfigPath <config-path> -PDPRootPath <path> [[-Release] <string>] -PDPInclude <filename> [-PDPExclude <filename>] -ImagesRootPath <path> -OutPath <output-dir> -OutName <output-name>
538562

539-
> As noted in [limitations](../README.md#limitations), we have full support for IAP's, but unlike
540-
> App Submissions and Flights, we do not yet have a [PDP](PDP.md) format for IAP
541-
> metadata, nor a function like `New-SubmissionPackage` to generate the json/zip payload that the
542-
> IAP functions require. This is [on our backlog](https://github.com/Microsoft/StoreBroker/issues/3).
543-
> If you use IAP's and would like to help, please refer to [CONTRIBUTING.md](../CONTRIBUTING.md).
563+
> Items in brackets ('[]') are optional.
564+
565+
The `-Release` parameter is technically optional, depending on how you choose to store your PDP
566+
files. For more info, run:
567+
568+
Get-Help New-InAppProductSubmissionPackage -Parameter PdpRootPath
569+
Get-Help New-InAppProductSubmissionPackage -Parameter Release
570+
571+
> If one of your parameters does not change often, you can specify a value in the config file and
572+
> leave out this parameter at runtime. In this case, you should specify the remaining parameters
573+
> to `New-InAppProductSubmissionPackage` with their parameter names. As an example, it is
574+
> possible to leave out `OutPath` but if you don't specify the remaining parameters by name,
575+
> then the value of the next parameter, `OutName`, will be mapped to the `OutPath` parameter,
576+
> causing a failure.
577+
578+
As part of its input, `New-InAppProductSubmissionPackage` expects a configuration file, which
579+
you should have [already created](SETUP.md#getting-your-iap-config).
580+
581+
### IAP Commands
544582

545583
You'll find the layout of these commands to mimic those for Applications and Flights.
546584
For every Get-* command there is a corresponding Format-* command that you can leverage.
547585

548586
> All IAP commands use the fully-spelled-out "InAppProduct". Even though PowerShell supports tab
549587
> completion at the commandline, aliases also exist for all of these commands as well. Any time
550-
> you see a command that has the phrase "InAppProduct", there exits an alias for that same command
588+
> you see a command that has the phrase "InAppProduct", there exists an alias for that same command
551589
> that replaces that phrase with "Iap" (e.g. Get-InAppProducts -> Get-Iaps).
552590
553591
The basic syntax looks of the update command looks like this:
@@ -619,13 +657,13 @@ fully override the publication and visibility of your IAP submission.
619657
620658
`Update-InAppProductSubmission` is a convenience method that wraps a number of individual
621659
commands into a single command. If you want to understand exactly what it does, refer to the
622-
previous section on ["manual submissions."](#manual-submissions) (similar methods exist for IAP
623-
submissions).
660+
previous section on ["manual submissions"](#manual-submissions) for applications (similarly-named
661+
methods exist for IAP submissions).
624662

625663
**Return Values**:
626664
`Update-InAppProductSubmission` returns back two values to you at its completion:
627665
the new submission id, and the UploadURL. You can use that UploadUrl to upload your submission's
628-
.zip with `Upload-SubmissionPackage`, in the event that you didn't specify the `PackagePath`
666+
.zip with `Upload-SubmissionPackage` in the event that you didn't specify the `PackagePath`
629667
or want to upload it again.
630668

631669
#### Other Common IAP-related Tasks:
@@ -648,10 +686,15 @@ To create a new IAP:
648686
New-InAppProduct -ProductId <productId> -ProductType <productType> -ApplicationIds <applicationIds>
649687

650688
where
651-
* **`<applicationIds>`** is a comma-separated list of ApplicationIds that should be able to offer
652-
this IAP.
653689
* **`<productId>`** is a unique name that you provide to refer to this IAP in this API and in your
654690
actual application sourcecode.
691+
* **`<productType>`** is either `Consumable` for a "Developer managed consumable", or
692+
`Durable` for a "durable managed consumable". Please note that at this time, although the
693+
Developer Web Portal supports the creation of "Store Managed Consumables", the Store Submission
694+
API _does not_. For more information on these types, see the online
695+
[documentation](http://go.microsoft.com/fwlink/?LinkId=787042).
696+
* **`<applicationIds>`** is a comma-separated list of ApplicationIds that should be able to offer
697+
this IAP.
655698

656699
To delete an IAP:
657700

0 commit comments

Comments
 (0)