A country-specific hotfix to support Electronic invoice under GST for India in Microsoft Dynamics 365 Finance

Applies to: Dynamics 365 for Finance and Operations

Summary


An electronic invoice is a legally accepted digital tax receiptdocument that your organization registers at Invoice Registration Portal (IRP).By using Microsoft Dynamics 365 Finance to generate electronic invoices, youhelp make sure that the electronic invoices that your organization generatesare secure, confidential, authentic, and legally acceptable. You can also makesure that required standards are applied to your electronic invoices.

This article describes how to enable, set up and useMicrosoft Dynamics 365 Finance with electronic Invoice Registration Portal (IRP)integration for India. It includes information about how to complete thefollowing tasks:

  • Feature activation
  • Configuring system to use electronic invoicing
  • Working with electronic invoices

More information


Information that is included in electronic invoices

An electronic invoice includes the following details:

  • The name, address, contact information and GSTINnumbers of the organization (seller) and a customer (buyer)
  • The invoice number, the date, and the documenttype
  • Details of goods and services for each itemsold:
    • Serial number of the item
    • Indication whether it is a service supply
    • SAC \ HSN code
    • Quantity, unit of measure and unit price
    • GST rate
    • Applied charges or discounts
    • Totals for invoice line
  • The document total details containingitemization of invoice totals

Prerequisites for using electronic invoices

To use electronic invoices in your organization, you mustcomplete the following tasks as prerequisite:

Note: You will need your GSTIN, Username,Password, Client ID and the Client secret.

Feature activation

You can open the Feature management workspace byselecting the appropriate tile on the dashboard or by going to Systemadministration > Workspaces > Feature management. Among otherfeatures find (India) Electronic invoice under GST and use button Enableto activate the feature. Read more about feature management and availableoptions in Featuremanagement overview article.

Configuring system to use electronic invoicing

Complete the below procedures to set up the system to useelectronic invoicing for India.

Import Electronic reporting (ER) configurations

To prepare Finance to interoperate with the IRP system, youmust import the following ER configurations. Refer to DownloadElectronic reporting configurations from Lifecycle Services article fordetails.


Note: While importing from Global Repo or LCS, you need to import only format configurations. Related model and model mapping configurations will be auto-imported.

Number

Configuration name

Configuration version

Configuration type

1

Invoice model

223 or higher

Model

2

Invoice model mapping

223.156 or higher

Model mapping

3

Sales invoice (IN)

223.15 or higher

Format

4

Project invoice (IN)

223.12 or higher

Format

5

Invoice validation model mapping

223.3 or higher

Model mapping

6

Invoice validation format (IN)

223.3 or higher

Format

7

Electronic Messages framework model

31 or higher

Model

8

eInvoice model mapping

31.8 or higher

Model mapping

9

eInvoice format (IN)

31.3 or higher

Format

10

eInvoice authentication import format (IN)

31.3 or higher

Format

11

eInvoice data import format (IN)

31.8 or higher

Format

 

Important

Be sure to import the most recent versions of theseconfigurations. The version description usually includes the number of theMicrosoft Knowledge Base (KB) article that explains the changes that wereintroduced in the configuration version.

Note

After all the ER configurations from the preceding table areimported, set the Default for model mapping option to Yes for the eInvoicemodel mapping configuration.

Set up Electronic messaging (EM) functionality

Electronic message functionality is provided to maintain thedifferent processes that are used in electronic reporting and transmission of differentdocument types. For more information about electronic messages, see Electronicmessaging article.

The most important step in setting up Electronic messagingfunctionality for IRP integration is to import the provided Indian IRPintegration setup.zip data package. Once successfully imported setup data,almost all required setup will be auto created. There only remaining requiredsetup will be selecting parameters for executable classes and setting up numbersequences for Electronic messaging. All those tasks are described bellow

Import a package of data entities thatincludes a predefined EM setup

The process of setting up the electronic messagefunctionality to interoperate with the IRP system has multiple steps. Becausethe names of some predefined entities are used in the ER configurations, it's importantthat you use a set of predefined values that are delivered in a package of dataentities for the related tables, and that you import the ER configurationsbefore you import the data entities.

1.      In MicrosoftDynamics Lifecycle Service (LCS), go to the Shared asset library,and select the Data package asset type.

2.      In the list of data package files, find and downloadIndian IRP integration setup.zip.

3.      After the file is downloaded, open Finance, andselect the company that you will interoperate with the IRP system from.

4.      Go to Workspaces > Data management.

5.      In the Data management workspace, go to Frameworkparameters > Entity settings, and select Refresh entity list.Wait for confirmation that the refresh has been completed. For more informationabout how to refresh the entity list, see Entitylist refresh.

6.      Validate that the source data and target dataare correctly mapped. For more information, see Validatethat the source data and target data are mapped correctly.

7.      Before the data entities are used for the firsttime to import the data from the package, sync the mapping of the source dataand target data. In the list for the package, select a data entity, and then,on the Action Pane, select Modify target mapping.

8.      Above the grid for the package, select Generatemapping to create a mapping from scratch, and then save the mapping.

9.      Repeat steps 7 and 8 for every data entity inthe package before you start the import.

For more information about data management, see Datamanagement overview.

You must now import data from the Indian IRP integrationsetup.zip file into the selected company. In the Data managementworkspace, select Import, specify a Group name, select Addfile, and then, in the drop-down dialog box, set the Source data formatfield to Package.

10.  Select Upload and add, select the IndianIRP integration setup.zip file on your computer, and upload it.

11.  After the data entities are uploaded, on theAction Pane, select Import.

You will receive a notification in Action center, oryou can manually refresh the page to view the progress of the data import. Whenthe import is completed, the Execution summary page shows the results.

After data entities are imported, you will find two types ofelectronic message processing: OnlineInvoicing (Indian Online Invoicing) and CancelInvoice(Indian Online Invoicing). This processing contains almost all the setup thatis required in your legal entity.

Processing

Name

Description

OnlineInvoicing

Indian Online Invoicing

This processing supports interoperation with the IRP system to submit information about sales, free text and project customer invoices. It parses the response from IRP to obtain and save Invoice Registration Number (IRN) and signed QR code.

CancelInvoice

Indian Online Invoicing

This processing supports interoperation with the IRP system to cancel previously registered customer invoices.

To review the imported processing, go to Tax > Setup> Electronic messages > Electronic message processing.

 

The electronic message processing from the previous tableworks with the following electronic message item types.

Electronic messages item type

Description

Processing

SalesIvoice

Customer invoice

OnlineInvoicing

ProjInvoice

Project invoice

OnlineInvoicing

To review the imported electronic message item types, go to Tax> Setup > Electronic messages > Message item types.

Set up the integration internet addresses

1.      Go to Tax > Setup > Parameters >Electronic messages > Web service settings.

Enter the following information to define theinternet address for web services.

Web service name

Description

Testing internet address

Authentication

This Authentication web service is provided by NIC. It is used to authenticate the sender on the IRP system side.

https://einv-apisandbox.nic.in/eivital/v1.03/auth

Generate IRN

This Generate IRN web service is provided by NIC. It is used to submit invoice to register on the IRP system side, and it sends back response that contains information about invoice processing along with unique invoice identifier (IRN) and QR code.

https://einv-apisandbox.nic.in/eicore/v1.03/Invoice

Cancel IRN

This Cancel IRN web service is provided by NIC. It is used to revoke \ cancel an invoice previously successfully registered on the IRP system side, and it sends back response that contains information about cancellation processing.

https://einv-apisandbox.nic.in/eicore/v1.03/Invoice/Cancel

Note: Internet addresses aresubject to change by National Informatics Centre (NIC). Therefore, we recommendthat you check for actual internet addresses on the official website of the e-Invoice System or otherappropriate sources. The official documentation also has information about the availableproduction internet addresses that you should set up.

2.      On the Request parameters, specify the same setof values for all the above web services:

Parameter

Value

Successful response code

200

Request method

POST

Content type

Application/json

Request headers format mapping

eInvoice format (IN)

image.png

Set up additional fields

EM items have additional fields that are included in the IndianOnline Invoicing type of electronic message processing (OnlineInvoicing) that isused to interoperate with the IRP system and imported into the system by usinga package of data entities. Additional fields are associated with EM items andare required for their processing. The system automatically sets values foradditional fields when actions are run. IRP integration uses only oneadditional field. Open Tax > Setup > Electronic messages >Additional fields to open Additional fields page and create new one, if notimported from the data package.

Field name

Description

AppKey

Unique ID, identifying unique user session.

 

Set up executable class parameters

Three executable classes are included in the electronic messagestypes (OnlinceInvoicing and CancelInvoice) that are used to interoperate withIRP system and are imported into the system by using a package of dataentities.

Executable class name

Description

Generate EM for SalesInvoice

This class generates Electronic Messages for EM items of customer invoice (sales order and free text invoice) type

Generate EM for ProjInvoice

This class generates Electronic Messages for EM items of project invoice type

Additional fields evaluation

For filled-in EM items (in Created status), this class evaluates the value for the AppKey additional field.

 

  1. Open Tax > Setup > Electronic messages> Executable class setting.
  2. Use New to create new Executable class ifit does not exist and specify the following values:
    1. In Executable class enter Additionalfields evaluation
    2. In Description enter Evaluateadditional fields for message items
    3. In Executable class name select EMAdditionalFieldsEvaluationController_IN
  3. In the Action Pane, select Parameters andthen, in the dialog box that appears, set the AppKey parameter to AppKey
    image.png

  4. Use New to create new Executable class ifit does not exist and specify the following values:
    1. In Executable class enter Generate EMfor SalesInvoice
    2. In Description enter Generates EM forSalesInvoice
    3. In Executable class name select EMGenerateMessageController_IN
  5. In the Action Pane, select Parameters andthen, in the dialog box that appears, set the following values for the parametersof the executable class.
    1. Format mapping to Sales Invoice (IN)
    2. Message status in case of success to Generated
    3. Message item status in case of technicalerror to Created
      image.png

  6. Use New to create new Executable class ifit does not exist and specify the following values:
    1. In Executable class enter Generate EMfor ProjInvoice
    2. In Description enter Generates EM for ProjInvoice
    3. In Executable class name select EMGenerateMessageController_IN
  7. In the Action Pane, select Parameters andthen, in the dialog box that appears, set the following values for theparameters of the executable class.
    1. Format mapping to Project invoice (IN)
    2. Message status in case of success to Generated
    3. Message item status in case of technicalerror to Created

 

Set up number sequences for electronic messages

To work with the Electronic messages functionality, you mustdefine related number sequences.

  1. Go to Tax > Setup > Parameters >General ledger parameters.
  2. On the Number sequences tab, set up two numbersequences:
  • Message
  • Message item

Set up batch settings for automated processing ofinteroperation with the IRP system

  1. Go to Tax > Setup > Electronic messages> Electronic message processing.
  2. Select either OnlineInvoicing or CancelInvoiceprocessing.
  3. On the Batch FastTab, select Createbatch, and then define the required parameters.

Set up security roles for electronic messageprocessing

Different groups of users might require access to OnlineInvoicingand CancelInvoice processing. You can limit access to the processing based onsecurity groups that are defined in the system.

To limit access to OnlineInvoicing and CancelInvoiceprocessing, follow these steps.

  1. Go to Tax > Setup > Electronic messages> Electronic message processing.
  2. Select OnlineInvoicing or CancelInvoiceprocessing, and then add the security groups that must work with thatprocessing. If no security group is defined for the processing, only a systemadmin can see the processing on the Electronic messages page.

Set up certificates and secrets for the IRP system

To interoperate with the IRP system, you must use a securitycertificate that is provided by the operator. There are two options for storingthis sensitive data:

  • Azure Key Vault storage
  • Local storage

For more information about how to set up Key Vault, see Settingup Azure Key Vault Client and MaintainingAzure Key Vault storage articles.

 

  1. Go to System administration > Setup >System parameters.
  2. Set the Use advanced certificate storeoption to No to store sensitive data locally. Set the option to Yes touse Key Vault storage.
  3. If you set the Use advanced certificate storeoption to Yes, go to System administration > Setup > Key Vaultparameters to set up the Key Vault parameters.
Note: The .CER certificate must be stored in Azure Key Vault as a secret, not a certificate. You need to open your .CER file in any text editor and copy its entire content to a secret value in Key Vault.
image.png


Set up electronic invoice parameters

Use Accounts receivable > Setup > Electronicinvoice parameters page to provide information used to submit invoices toIRP and additional parameters to control validations at invoice posting time.Following table describes available options.

Parameter

Parameter description

Validate before posting

You can enable additional validation against all mandatory information to be included in the electronic invoice at the invoice posting time.

Validation format

ER format used for validation against all required mandatory elements in the electronic invoice. Available only when Validate before posting function is enabled.

GSTIN

Your Goods and Services Taxpayer Identification Number, used for IRP integration.

User name

Reference to KeyValut secret for your user name provided by NIC, used for IRP integration

User password

Reference to KeyValut secret for your user password provided by NIC, used for IRP integration

Client Id

Reference to KeyValut secret for your user Client Id provided by NIC, used for IRP integration

Client secret

Reference to KeyValut secret for your Client secret provided by NIC, used for IRP integration

Certificate

Reference to KeyValut secret for your Certificate provided by NIC, used for IRP integration

Set up unit of measure

You need to repeat that for all units of measure that youuse in electronic invoices to match allowed external codes.

  1. Go to Organizationadministration > Setup > Units > Units.
  2. Select one ofunits, eg. "ea" unit and click External codes.
  3. Enter Code(eg. EInv_IN) and External code definition

    Note: Code will beused across all units of measure to identify master data set of units ofmeasure codes accepted by electronic invoicing.
  4. Select your createdelectronic invoicing unit external code (eg."Einv_IN") and enter the Value(eg. "NOS") in the bottom grid of the form

The external codes will beused as international trade units of measure codes recommended by technicalspecification.

Set up HSN codes and products

Details how to setup HSN codes can be found in DefineHSN codes and Service Accounting Codes article. The below proceduresillustrate only the process of setting up the code and assigning it to theproduct.

Define HSN code

  1. Go to Tax > Setup > Salestax > India > HSN code.
  2. Create a record.
  3. In the Chapter field,enter a value.
  4. In the Heading field,enter a value.
  5. In the Subheading field,enter a value.
  6. In the Country/regionextension field, enter a value.
  7. In the Statisticalsuffix field, enter a value.
  8. Save the record, and verify thatthe HSN code field is updated.
  9. In the Description field,enter a value.
  10. Select Close.

Assign HSN codes to products

  1. Go to Product information management >Products > Released products.
  2. Select a product, and then select Edit.
  3. On the General FastTab, if the producttype is Item, select a value in the HSN code field.

Set up tax registration numbers

Details how to setup GSTIN master data can be found in Createa GSTIN master article . The below procedure illustrates only simplifiedprocess of setting up registration numbers for use in electronic invoicing.

  1. Go to Tax> Setup > Sales Tax > Enterprise tax registration
  2. Crate a new record
  3. Select Tax type= GST and Registration number type = Company
  4. Enter the Registrationnumber and save the data
  5. Crate a new record
  6. Select Tax type= GST and Registration number type = Customer
  7. Enter the Registrationnumber and save the data

Set up your legal entity

1.       Go to Organizationadministration > Organizations > Legal entities

2.       Expand the Addressestab and use button Add to create new or Edit already existing primary address

3.       Enter or update ZIP,Street, City, District, State and County

Note: Please note that States should have Statecodes assigned in Organizationadministration > Setup > Addresses> Address setup > State/province tab.

4.       Close Editaddresses form

5.       Click RegistrationIDs and select your primary address

6.       In Manageaddresses page expand Tax information fast tab

7.       Use Add toset Name or description (eg. “GST”) and select previously createdCompany registration number in GSTIN/GDI/UID field

8.       Close the Manageaddresses

9.       Expand Contactinformation fast tab in Legal entities form to add Primary phone andPrimary email

Set up your customers

Open the customer master from Accountsreceivable > Customers > Allcustomers to enter or edit customer information required forelectronic invoicing.

Set up tax information

1.      Expand the Addresses tab for a selected customeraccount and use button Add to create new or Edit already existing primaryaddress

2.      Enter or update ZIP, Street, City,District, State and County

Note: Please note that States should have Statecodes assigned in Organizationadministration > Setup > Addresses> Address setup > State/province tab

3.      Close Edit addresses form

4.      Click Registration IDs and select yourprimary address

5.      In Manage addresses form expand Taxinformation fast tab

6.      Use Add to set Name or description(eg. “GST”) and select previously created customer registration number in GSTIN/GDI/UIDfield

7.       Close the Manage addresses

Set upcontact information

  1. Use Contacts button to either editexisting or create a new customer contact
  2. In Sales demographics tab of Customermaster, select existing Primary contact
  3. Expand Contact information fast tab in Customersform to add Primary phone and Primary email

Note: Customercontact details might not be necessary for some versions of Dynamics 365Finance.

Enable customer for electronic invoicing

  1. Expand Invoice and delivery fast tab in Customersform
  2. Check the eInvoice checkbox for a customer

Note: If this option is set to Yes,the system will be marking invoices posted for this customer account as readyfor electronic invoice processing.

Working with electronic invoices

EM functionality runs actions that are included in theprocessing (OnlineInvoicing or CancelInvoice), based on the status of messagesand message items.

Register electronic invoices

When an invoice is posted for e-invoice enabled customerfrom a sales order, Free text invoice or Project invoice proposal, you can runEM processing to create JSON electronic invoice and register it at the IRP system.

  1. Open Tax > Inquiries and Report >Electronic messages > Electronic messages page.
  2. Select OnlineInvoicing processing
  3. Use Run processing function to createelectronic invoices for all relevant posted document and send them to IRP

Note: You can use Run in thebackground option to setup a batch processing to send all appropriate newlyposted documents to IRP based on predefined time interval.

image.png

Once operation is completed you can see information aboutnumber of processed documents in the action log:

image.png

Successful completion of invoice registration will update informationin E-invoice status page which can be found in Sales or Projectinvoice journals, as well as invoice flag Sent electronically.

Received IRN and QR code can be printed in Tax invoice reportsavailable in the Sales or Project invoice journals:

image.png

 

Cancel electronic invoices

When an invoice is registered at IRP, you can select it forcancelation and run EM processing to cancel it at the IRP system.

  1. Open Sales or Project invoice journalpage and identify invoice you want to cancel
  2. Use E-Invoice option to open e-invoicestatus page
    image.png

  3. Use Cancel function to select a previouslysuccessfully registered invoice for cancelation
    image.png

    Note: Status will be updated to “Cancel”
  4. Open Tax > Inquiries and Report >Electronic messages > Electronic messages page.
  5. Select CancelInvoice processing
  6. Use Run processing function to cancel allelectronic invoices selected for cancellation

Note: You can use Run in thebackground option to setup a batch processing to send all appropriate newlyposted documents to IRP based on predefined time interval. Once operation iscompleted you can see information about number of processed documents in theaction log pane.

Inquire on electronic invoices

You can quickly review which invoices are registered byopening Sales or Project invoice journal and checking the statusindicated in Sent electronically column.

image.png

You can find details information about status of electronicinvoice using E-Invoice page available in Sales and Projectinvoice journal pages.

image.png

The E-Invoice page, Overview tab

image.png

shows statuses of electronic invoice. Here are the possiblestatuses the electronic invoice can get:

Status

Description

Created

Invoice is posted and ready to be sent to IRP. You can run OnlineInvoicing processing to start registration process.

Sent

Invoice has been successfully registered at IRP

Cancel

Invoice is selected for cancelation. You can run CancelInvoice processing to start cancellation process.

Cancelled

Invoice has been successfully cancelled at IRP

After successful registration in the same tab, you will see Acknowledgementnumber and Acknowledgement date. Go to Details tab to review receivedIRN, Signed QR code and Signed invoice. This informationwill be cleared when invoice is cancelled.

image.png

 

Frequently asked questions

Q: Can I unselect an invoice previously successfully registeredand selected for cancellation?

It is not possible to unselect an invoiceonce selected for cancellation in the E-Invoice status page. IRP does not allowthe send again an invoice once cancelled so the only option is to create andpost a new one. 

image.png

Q: Can I specify additional criteria to be considered whenselecting invoices for electronic processing, either to register or cancelinvoice?

You can review and modify queriesused for invoice selection in Tax > Setup > Electronic messages >Populate record actions page. Edit query button opens system queryform to setup additional or modify existing query criteria.

image.png

Q: Where can I find detailed information what went wrong foran invoice which was not successfully registered?

You can review action log in Open Tax> Inquiries and Report > Electronic messages > Electronic messagespage to see the details. Response code and response description are availablein the action that failed.

image.png

 

Q: What is not is cope of electronic invoice solution forIndia?

    • Digital signature by seller
    • Generation of IRN
    • ISD Invoice
    • AP e-Invoice import

Q: What are the supported formats of electronic invoice forIndia?

The export of electronic invoicecan be done in JSON format that containing all required fields definedin technical specification. If there is another format or you need to add extrainformation to the electronic invoice message, you may use Electronicreporting to modify Microsoft provided format or create a new one. Findmore information in Electronicreporting (ER) overview article.

Q: What are the supported integrations for Indian electronicinvoice registration?

The generated JSON electronic canbe submitted to IRP directly and that is a default setup of Electronicmessages done though importing data package.As the out of the box supported integration is using Electronic messages, youcan use it to change configurations and validate possibility to integrate withany GSP of your choice. For more information about electronic messages, see Electronicmessaging article.

Note: Integration through GSP isnot supported by Microsoft natively.