|
| 1 | +# Publish a listing to the Marketplace |
| 2 | + |
| 3 | +This guide walks you through the process of submitting your marketplace listing, reviewing it, and publishing it for users to access and engage with. You learn about creating and updating marketplace submissions, the roles of the marketplace publisher and admin, and the steps involved in getting your submission approved. Whether you're new to the DevRev CLI or looking for a refresher, this documentation provides you with the necessary information to go through the publishing process seamlessly. Let's dive in and get started. |
| 4 | + |
| 5 | +## Glossary |
| 6 | + |
| 7 | +### Marketplace |
| 8 | + |
| 9 | +A platform for creators and consumers to collaborate, engage, and conduct transactions. It provides an avenue for distributing your products and services, thereby enabling you to generate revenue from them. |
| 10 | + |
| 11 | +### Marketplace submission |
| 12 | + |
| 13 | +An object used as a proposal for a marketplace listing which marketplace admins can review and approve/reject. |
| 14 | + |
| 15 | +### Marketplace item |
| 16 | + |
| 17 | +Any item in marketplace listings that is available for installation. |
| 18 | + |
| 19 | +### Marketplace listing |
| 20 | + |
| 21 | +All marketplace items that have the same slug. It is also important to note that at most one item, belonging to a specific marketplace listing, can be in the _Published_ state. |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +## Publishing process |
| 26 | + |
| 27 | +The marketplace publisher creates a marketplace submission, requesting the creation of a new marketplace listing or updating an existing one. Once the submission is ready for review, the publisher transitions it to the _Waiting for review_ state. During this phase, an admin reviews and decides whether to approve or reject the submission. If the admin approves the submission, the publisher can proceed to publish it. However, if the admin rejects the submission, the publisher can update and resubmit it for another round of review. |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +## Before you begin |
| 32 | + |
| 33 | +To get started with creation of marketplace listings, you need to have the DevRev CLI installed. You can find the [installation guide here](https://developer.devrev.ai/snapin-development/references/cli-install). You also need a snap-in for which the listing will be created. If you haven't created a snap-in yet and need help, [click here](https://developer.devrev.ai/snapin-development/tutorials/overview). |
| 34 | + |
| 35 | +## Manage marketplace listings |
| 36 | + |
| 37 | +1. ### Create marketplace listing |
| 38 | + |
| 39 | + #### Initial submission |
| 40 | + |
| 41 | + When creating a new marketplace listing, an initial marketplace submission must be created with all the mandatory properties. To create a new listing, run the following command, which will start a wizard to guide you through the process: |
| 42 | + |
| 43 | + ```bash |
| 44 | + devrev marketplace_submissions create |
| 45 | + ``` |
| 46 | + |
| 47 | +  |
| 48 | + |
| 49 | + #### New submission for an existing marketplace item |
| 50 | + |
| 51 | + When a marketplace listing already exists (there is at least one marketplace item in the _Published_ or _End of sale_ state), you can modify it by creating a new marketplace submission. |
| 52 | + |
| 53 | + To create a new submission for an existing listing, run the following command, which will start a wizard to guide you through the process: |
| 54 | + |
| 55 | + ```bash |
| 56 | + devrev marketplace_submissions create |
| 57 | + ``` |
| 58 | + |
| 59 | +  |
| 60 | + |
| 61 | +2. ### Update marketplace submission |
| 62 | + |
| 63 | + Once a marketplace submission has been created, it can be updated by running the following command, which will start a wizard to guide you through the process: |
| 64 | + |
| 65 | + ```bash |
| 66 | + devrev marketplace_submissions update |
| 67 | + ``` |
| 68 | + |
| 69 | +3. ### Publish marketplace submission |
| 70 | + |
| 71 | + The newly created marketplace submission is in the _Draft_ state. In order to publish it, we first have to transition it to _Waiting for review_ state. This can be done by running the following command, which will start a wizard to guide you through the process: |
| 72 | + |
| 73 | + ```bash |
| 74 | + devrev marketplace_submissions transition |
| 75 | + ``` |
| 76 | + |
| 77 | + Once the submission is transitioned to the _Waiting for review_ state, it needs to be approved by a marketplace admin. While in review, the state of the submission is _In review_. Once it is reviewed, the state will be changed to either _Approved_ or _Rejected_. |
| 78 | + |
| 79 | + <Callout intent="note"> |
| 80 | + Submissions whose state is _In review_ or _Approved_ cannot be modified. |
| 81 | + </Callout> |
| 82 | + |
| 83 | + If the submission was rejected, you can transition it back to _Draft_ and modify it to satisfy the requirements. Once it is updated, you can transition it back to _Waiting for review_ to be reviewed again. |
| 84 | + |
| 85 | + If the submission was approved, you can publish it using the following command, which will start a wizard to guide you through the process: |
| 86 | + |
| 87 | + ```bash |
| 88 | + devrev marketplace_items publish |
| 89 | + ``` |
| 90 | + |
| 91 | + To make sure that marketplace item was published you can retrieve it using its ID: |
| 92 | + |
| 93 | + ```bash |
| 94 | + devrev marketplace_items show [marketplace_item_id] | jq '{name: .name, id: .id}' |
| 95 | + ``` |
| 96 | + |
| 97 | + Example: |
| 98 | + |
| 99 | + ```bash |
| 100 | + devrev marketplace_items show 'don:integration:dvrv-us-1:devo/1:marketplace/1:marketplace_item/1' | jq '{name: .name, id: .id}' |
| 101 | + ``` |
| 102 | + |
| 103 | +4. ### Delete marketplace submission |
| 104 | + |
| 105 | + If a marketplace submission was created by mistake or is no longer relevant, it can be deleted. However, deletion of a submission is only permitted for the owners of the submission and is restricted to submissions that are in the _Draft_ or _Rejected_ state. |
| 106 | + |
| 107 | + You can delete a submission using the following command, which will start a wizard to guide you through the process: |
| 108 | + |
| 109 | + ```bash |
| 110 | + devrev marketplace_submissions delete |
| 111 | + ``` |
| 112 | + |
| 113 | +## Automatic upgrade of marketplace listings installations |
| 114 | + |
| 115 | +Automatic upgrade is supported for marketplace listings installations. Once a new version of the listing is published, the respective snap-in will be automatically upgraded to the latest version. |
| 116 | + |
| 117 | +However, there are some criteria that need to be met for automatic upgrade to work: |
| 118 | + |
| 119 | +- The upgrade should not require any user input/action. |
| 120 | +- There should not be any new global variables added. |
| 121 | +- There should not be any new connections that needs to be configured. |
| 122 | + |
| 123 | +## Sharing marketplace listings |
| 124 | + |
| 125 | +By default, all marketplace listings are accessible to all users. However, if you want to share a specific listing with certain organizations only, follow the steps below: |
| 126 | + |
| 127 | +1. When creating an initial submission, property `access_level` should be set to `restricted`. |
| 128 | +2. Proceed through the review process to obtain approval for the submission. |
| 129 | +3. Once the submission is approved, publish it to create a marketplace item. |
| 130 | +4. To invite a specific dev organization to the newly created item, execute the following command: |
| 131 | + |
| 132 | + ```bash |
| 133 | + devrev marketplace_items invite [marketplace_item_id] [dev_org_id] |
| 134 | + ``` |
| 135 | + |
| 136 | + Example: |
| 137 | + |
| 138 | + ```bash |
| 139 | + devrev marketplace_items invite 'don:integration:dvrv-us-1:devo/1:marketplace/1:marketplace_item/1' 'don:identity:dvrv-us-1:devo/2' |
| 140 | + ``` |
| 141 | + |
| 142 | +Once an organization is invited to a listing, its members can view and install it within their own organization. |
| 143 | + |
| 144 | +<Callout intent="note"> |
| 145 | +When a listing is marked as restricted, it is possible to change the access level to `public`. However, the reverse process, changing the access level from `public` to `restricted`, is not permitted. |
| 146 | +</Callout> |
| 147 | + |
| 148 | +When a listing is shared with an organization, this information is retained when creating new submissions for the same listing. Additionally, automatic upgrades function seamlessly, just like in the case of public listings. |
| 149 | + |
| 150 | +## Command reference |
| 151 | + |
| 152 | +Show a marketplace submission: |
| 153 | + |
| 154 | +```bash |
| 155 | +devrev marketplace_submissions show [marketplace_submission_id] | jq "{name: .name, id: .id, type: .type}" |
| 156 | +``` |
| 157 | + |
| 158 | +List marketplace submissions: |
| 159 | + |
| 160 | +```bash |
| 161 | +devrev marketplace_submissions list | jq "{name: .name, id: .id, type: .type}" |
| 162 | +``` |
| 163 | + |
| 164 | +Show a marketplace item: |
| 165 | + |
| 166 | +```bash |
| 167 | +devrev marketplace_items show [marketplace_item_id] | jq "{name: .name, id: .id, type: .type}" |
| 168 | +``` |
| 169 | + |
| 170 | +List marketplace items: |
| 171 | + |
| 172 | +```bash |
| 173 | +devrev marketplace_items list | jq "{name: .name, id: .id, type: .type}" |
| 174 | +``` |
0 commit comments