# Vendor Sales Reports Overview

## **What is Vendor Sales Report**

**Vendor Sales Reports** may be used by vendors who sell add-ons via the Atlassian Marketplace.

It contains two major components and features:

* a **scheduled job** that fetches sale records via the Atlassian Sales API and stores them in your Confluence database
* a **macro** that can dispay sale records in a tabular fashion. The macro output may be used to generate charts using Confluence Charts.
* **in-app notifications** on new sales to not miss every single transaction
* support **multiple vendor accounts** to aggregate more into a report&#x20;

## How to Download the Complete Sales History <a href="#vendorsalesreports-howtodownloadthecompletesaleshistory" id="vendorsalesreports-howtodownloadthecompletesaleshistory"></a>

Vendor Sales Reports comes with a **scheduled job** running within Confluence's scheduler. It is responsible for downloading the sales records via the [Atlassian Sales REST API](https://developer.atlassian.com/display/UPM/Accessing+Sales+Reports+with+the+REST+API).

The job does the following for **each vendor account** you register:

1. **first run:** downloads the earliest set of sales records (the response is limited to 50 items by the API)
2. **subsequent runs:** download the next set of records starting from the date of the last item already downloaded

This way the **complete sales history** is downloaded and stored gradually in your Confluence database.

Configure vendor account connections to the Marketplace in the App's Configuration page:

![](https://1762319617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfBkpv7rXaP6Xbv9Bje0%2Fuploads%2FF4b9MsdlmRb1EtjUngqg%2Fimage.png?alt=media\&token=e5cc70c1-8d89-4038-b002-4ff22e8b7410)

| Field                 | Description                                                                                                                                                   |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Vendor ID             | Marketplace Vendor ID of your organization                                                                                                                    |
| Vendor Name           | Name of the vendor                                                                                                                                            |
| Account Email Address | The Atlassian ID to connect to the Marketplace. This account must be privileged to access transaction details.                                                |
| Account Password      | Pwd of the account to connect. Passwords are stored in encrypted form.                                                                                        |
| Sales Group           | User group whose members will see pricing information and may get notifications of new sales depending on Notification Type                                   |
| Date View Group       | Members of this user group will be able to search and view transaction details **without** pricing information. They will not get notifications of new sales. |
| Notification Type     | The way the members of the Sales Group should get notified: None, In-app, Email, In-app and Email.                                                            |

## How to Render Your Sales Records <a href="#vendorsalesreports-howtorenderyoursalesrecords" id="vendorsalesreports-howtorenderyoursalesrecords"></a>

**Vendor Sales Reports** comes with a Macro that allows you to render sales records in various ways.

The macro allows you to **set criteria** on the sales records to be included in the output and **set the type** of output.

### Search for Sales Records <a href="#vendorsalesreports-searchforsalesrecords" id="vendorsalesreports-searchforsalesrecords"></a>

There some parameters of the macro that determine the set of sales records that will be rendered or aggregated by the macro.

The parameters are:

* **startDate**: first date of sales to be included
* **endDate**: last date of sales to be included
* **reportPeriod**: set periods relative to the current date. Values are:
  * **All**: search for all records determined by startDate/endDate
  * **Today**: search for sales records from the current day
  * **This week/month/year**: search for sales records from the current week/month/year
* **addonName**: name of the add-on to search for

It is important to understand the following:

* **startDate** and **endDate** must be specified in a format of **yyyy-MM-dd**, such as **2012-12-31**
* if both start/end date and period is defined, the macro searches for the sales records from the narrowest time frame:
  * if **start date** is earlier than the first day of the period, the latter will be used otherwise the former
  * if **end date** is later than the last day of the period, the latter will be used, otherwise the former
* search can be limited to a **single add-on** by specifying its name (not the key)

### Set Output Type <a href="#vendorsalesreports-setoutputtype" id="vendorsalesreports-setoutputtype"></a>

The macro generates data in a **tabular fashion** and adds a **summary** section to the top of the data table. The date in the table may be sorted by clicking on the column headers.

The macro renders data in the following ways:

* Detailed
* Aggregated
* Totals only

**Detailed Reports**

Set the macro's output type to **Detailed**.

It will result in a table that shows all fields of all sales records returned by the filter parameters of the macro.

**Aggregated Reports**

By setting the macro's output type to either of the **aggregated** value, the output will a briefer summary of your sales activity.

Sales records may be aggregated by **day**, **week**, **month** and **year**. The aggregated output renders:

* the aggregated value (day, week, etc)
* the number of records pertaining to the group keyed by the aggregated value
* the total sales price of the group
* the total vendor amount of the group

**Totals Only**

By setting the macro's output type to **Totals Only**, you can have a short table containing number of sales records, total of sales price and vendor amounts.

Totals only is a special form of aggregation.

#### Generate Charts <a href="#vendorsalesreports-generatecharts" id="vendorsalesreports-generatecharts"></a>

All output types of the macro renders data in a **HTML table**. The macro's output may be added to the body of the Confluence Chart macro.

Confluence Charts macro is a flexible means to generate **various chart type** using the data tables in its body.

An example configuration of the charts macro:

* type: line
* width: 1200
* Display rendered data: after
* Chart title: Sales records 2012
* Chart Subtitle: Aggregated monthly
* Show legend?: true
* Tables: 1
* Columns: 1,3,4 (numbers mean respectively: aggregated date, total of sales price, total of vendor amounts)
* Content orientation: vertical
* Time series?: true
* Date format: yyyy MMM
* Time period: Month

The above configuration of the charts macro will result in a report like this one:

![](https://1762319617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfBkpv7rXaP6Xbv9Bje0%2Fuploads%2FDyoZU2KBkwx1qDIInmbO%2Fimage.png?alt=media\&token=2d30b9fd-beda-405d-9e1c-e486dad92e6f)

#### Live Search Transaction Data <a href="#vendorsalesreports-livesearchtransactiondata" id="vendorsalesreports-livesearchtransactiondata"></a>

A new macro, "**Vendor sales data browser"** has been added to v3.0.0. This allows you to search for SEN numbers, AT numbers or company names in the transaction database and display the results dynamically.

![](https://1762319617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfBkpv7rXaP6Xbv9Bje0%2Fuploads%2FDxjfwUUW03GuV1TB7PaN%2Fimage.png?alt=media\&token=a83bc61f-3961-460a-ac83-f89341e7c1bc)

### Disclaimer <a href="#vendorsalesreports-disclaimer" id="vendorsalesreports-disclaimer"></a>

Hereby we declare that we do not take responsibility of any form for damages of any kind you may experience using this plugin.

### Screenshots <a href="#vendorsalesreports-screenshots" id="vendorsalesreports-screenshots"></a>

![](https://1762319617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfBkpv7rXaP6Xbv9Bje0%2Fuploads%2FtRu6x9V4SpiS1Q6q9oYa%2Fimage.png?alt=media\&token=1ce294d0-24ad-4668-a03b-021e833d134a)

![](https://1762319617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfBkpv7rXaP6Xbv9Bje0%2Fuploads%2FxBedG0CeEnSCI7XfGox2%2Fimage.png?alt=media\&token=ac316eb2-949d-42ec-8f67-d84d50f915e0)

![](https://1762319617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfBkpv7rXaP6Xbv9Bje0%2Fuploads%2Fd4iNwjpnkKOQzKyPTq9b%2Fimage.png?alt=media\&token=822762ba-b04d-4af1-8c68-8bd59f7226da)

![](https://1762319617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfBkpv7rXaP6Xbv9Bje0%2Fuploads%2FM9Sv9egSTvEUryNb1AxU%2Fimage.png?alt=media\&token=8de5a6d5-a4dc-45b4-94e3-c586556c4488)

![](https://1762319617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfBkpv7rXaP6Xbv9Bje0%2Fuploads%2F0bJKeirz0D3mCUuRfgff%2Fimage.png?alt=media\&token=da805e90-ec89-4994-bba3-62549cf9986d)

![](https://1762319617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfBkpv7rXaP6Xbv9Bje0%2Fuploads%2FwUDahA3E37XFr0AoSI5g%2Fimage.png?alt=media\&token=3ca0471f-084f-4e2c-8add-dc9bb734055b)

![](https://1762319617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfBkpv7rXaP6Xbv9Bje0%2Fuploads%2FgF2omXSBMhyngGldLjM1%2Fimage.png?alt=media\&token=8f329e7e-a07b-4f4e-81f1-46a2377d5aed)

![](https://1762319617-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMfBkpv7rXaP6Xbv9Bje0%2Fuploads%2F9NrpjmxhXHIobw5qlsbq%2Fimage.png?alt=media\&token=a3e1a7b6-9ea5-47b5-b36e-a647be7eb8b7)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.meta-inf.hu/vendor-sales-report/general-product-information/vendor-sales-reports-overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
