Step-by-Step Process to Create GSTR-1 Report JSON Format in D365 FO

While working in the ER, I encountered a scenario where I needed to generate a GSTR-1 report in JSON format. Although the standard system provides a data model and model mapping, it only includes an Excel format by default. This meant that a new format mapping had to be created specifically for JSON.

In this blog, I’ll walk you through the step-by-step process of creating the JSON format for the GSTR-1 report based on the given template. Let’s get started!

  • Set up a new format configuration for the GSTR-1 report in JSON format within the standard system (STD).
  • Develop the JSON format as per the given template, ensuring it meets the required specifications.
  • Use the available data sources from the standard GSTR-1 report and apply ER (Electronic Reporting) calculations to align with the JSON structure.
  • The final step is mapping the fields from the data sources to the JSON format created earlier. Ensure each field in the data source corresponds correctly to its position in the JSON template to generate an accurate and well-structured report.

1. Navigate to the Electronic Reporting Workspace

Go to Organization administration > Workspaces > Electronic reporting.

Article content

2. Select the GST Returns Model

  • In the configuration tree, select 'GST Returns model'.
  • If no customizations are added, choose 'GST Returns model' data model configuration.
  • If customizations are added, select 'GST Returns model\custom GST Returns model'.

Article content

3. Create a New Configuration

  • Create a new configuration by selecting format-based configuration.

Article content

  • Select the newly created JSON format configuration and click on Designer.

Article content
Format designer page

5. Add a File Component

  • In the format designer screen, click Add -> Common -> File.

Article content
Add file component
Article content

6. Create JSON Header

  • Select JSON file to define the header structure.

Article content

7. Define JSON Properties

  • Follow the given JSON template to create properties for '{' braces and arrays for '['.
  • Arrays can be created inside properties to define nested structures.

Article content
JSON template for GSTR1 report

8. Configure JSON Format for GSTR-1

  • Design the JSON format in the ER report format configuration.
  • Create an array object for invoice items since one invoice can have multiple items.

Article content

9. Save Changes and Map Data Model

  • After designing the format, save the changes.
  • Open the Mapping section on the right side of the same screen.
  • Map the JSON fields with the data model.

10. Modify Format Configuration Only

  • The following screenshot displays the Standard (STD) model, where the yellow-highlighted sections represent header data. The required fields for the JSON format will be sourced from the report lines.
  • Since the header data remains unchanged, I will utilize ER calculations to extract the necessary data sources. These data sources will return a record list, which will then be used for JSON format mapping in the Electronic Reporting (ER) configuration.


Article content

11. Grouping Data for JSON Formatting

Grouping Report Header

  • Select Report header
  • Click on Add -> Data sources -> Functions -> Group by and provide a meaningful name.
  • Select parmGSTIn as the group by field, then save and click OK.

Article content
Article content

Grouping Invoice Data

  • Select GroupByCustGST.
  • Click Add -> Data sources -> Functions -> Group by.
  • Name it GroupByInvoice.
  • Set GroupByCustGST.Line as What to group.
  • Set GroupByCustGST.Lines.ParmInvoiceNumber as the group by field.
  • Save the changes.

Grouping Item Data

  • Repeat the process for grouping by item.

Article content

12. Bind the Fields Accordingly

  • Ensure all fields in the JSON structure are correctly mapped to the data model.

Article content


Article content

Sample JSON Format for GSTR-1 Report

{
  "gstin": "22AAAAA0000A1Z5",
  "filing_period": "032024",
  "b2b": [
    {
      "customer_gstin": "29BBBBB0000B1Z6",
      "invoice_details": [
        {
          "invoice_number": "INV001",
          "invoice_date": "2024-03-10",
          "invoice_value": 15000.00,
          "items": [
            {
              "item_number": 1,
              "item_description": "Product A",
              "taxable_value": 12000.00,
              "tax_rate": 18,
              "igst_amount": 2160.00,
              "cess_amount": 0.00
            }
          ]
        }
      ]
    }
  ]
}        

This guide ensures that the GSTR-1 JSON format is correctly configured in D365 FO using Electronic Reporting (ER).

Thank you.



Eunice ogugua

Microsoft Application Functional consultant |Dynamic 365 Finance and Operations, Certified|Microsoft Dynamics 365(SCM)

4w

Thanks for sharing, I encounter a problem while trying to create Fixed Asset Roll forward report, I did not see the model or name on the list for Microsoft global configuration, so I decide to create a new configuration, but from your step, you pick a model from the list before create a new configuration

To view or add a comment, sign in

More articles by Saraswathi V

Insights from the community

Others also viewed

Explore topics