A country-specific hotfix to enable support for stock transfer orders and multiple GST registrations in electronic invoice under GST for India in Microsoft Dynamics 365 Finance

Applies to: Dynamics 365 for Finance and Operations


This application update enables multiple scenarios for electronic invoice under GST in India:

  • Using multiple sets of credentials for integration with IRP (Invoice Registration Portal) per a company GST registration number in one legal entity
  • Creating electronic invoices for stock transfer orders including stock transfer order cancelation
  • and adds a number of improvements:
    • Better traceability of e-Invoices 
    • Improved management of e-invoice status          
    • Updated E-invoice status form
    • Trouble shooting and re-processing of messages with errors
    • Debit note identification
    • Encrypted QR code
    • Mapping of electronic invoice data elements
    • Configurable eInvoice tax components.

More information


Implemented changes in scope of this update require new setof configurations to be imported as well as an updated data package forElectronic messaging setup.

Import Electronic reporting (ER) configurations

You must import the following ER configurations. Refer to DownloadElectronic reporting configurations from Lifecycle Services article fordetails. It is enough if you import format configurations only, all the otherrequired configuration types will be automatically imported.


Configuration name

Configuration version

Configuration type


Invoice model

231 or higher



Invoice model mapping (IN)

231.6 or higher

Model mapping


 GST Invoice format (IN)

231.5 or higher



Electronic Messages framework model

31 or higher



eInvoice model mapping

31.12 or higher

Model mapping


eInvoice format (IN)

31.3 or higher



eInvoice authentication import format (IN)

31.5 or higher



eInvoice data import format (IN)

31.10 or higher




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.


After all the ER configurations from the preceding table areimported, set the Default for model mapping option to Yes for the eInvoicemodel mapping configuration. Please note that with this update, thevalidation format prior posting has changed, and you should select GSTInvoice format (IN) in the E-invoice parameters form.

Set up Electronic messaging (EM) functionality

Electronic message functionality is provided to maintain thedifferent processes that are used in electronic reporting and transmission ofdifferent document 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 updated data package IndianIRP integration setup v2.zip. Once successfully imported setup data, almostall required setup will be auto created. There only remaining required setupwill be selecting parameters for executable classes and setting up numbersequences for Electronic messaging. All those tasks are described below.


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'simportant that you use a set of predefined values that are delivered in apackage of data entities for the related tables, and that you import the ERconfigurations before 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 anddownload Indian IRP integration setup v2.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 v2.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 v2.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 the Action center,or you can manually refresh the page to view the progress of the data import.When the import is completed, the Execution summary page shows the results.


In order to finalize Electronic messages setup afterimporting data package, you need to complete the below procedure:

  1. Open Tax > Setup > Electronic messages> Executable class setting.
  2. Select Executable class “Generate EM”.
  3. In the Action Pane, select Parameters and then,in the dialog box that appears, set the following values for the parameters ofthe executable class.
    1. Formatmapping to GST Invoice format (IN)
    2. Messagestatus in case of success to Generated
    3. Messageitem status in case of technical error to Created



In case you previously imported the Indian IRPintegration setup.zip data package as described in KnowledgeBase Article KB4554936  you must follow the below steps. Please note, it isnot needed if you did not import the previous data package.

  1. Open Tax > Setup > Electronic messages> Message processing actions
  2. Select “Generate cancel invoice request”
  3. Remove “Error generating cancel invoice request”from Initial statuses fast tab.
  4. Select “Generate invoice request”
  5. Remove “Error generating invoice request” fromInitial statuses fast tab.
  6. Select “Generate token request”
  7. Remove “Error generating token request” fromInitial statuses fast tab.
  8. Select “Import decrypted cancel IRN response”
  9. Remove “Error cancel invoice response importing”from Initial statuses fast tab.
  10. Select “Import decrypted generate IRN response”
  11. Remove “Error decrypting generate IRN” fromInitial statuses fast tab.
  12. Select “Import encrypted cancel IRN response”
  13. Remove “Error decrypting cancel IRN” fromInitial statuses fast tab.
  14. Select “Import encrypted generate IRN response”
  15. Remove “Error invoice response importing” fromInitial statuses fast tab.
  16. Select “Import token response”
  17. Remove “Error token response importing” fromInitial statuses fast tab.
  18. Select “Submit cancel invoice request”
  19. Remove “Error sending cancel invoice request”from Initial statuses fast tab.
  20. Select “Submit token request”
  21. Remove “Error sending token request” fromInitial statuses fast tab.
  22. Select “Generate ProjInvoice EM”
  23. In General fast tab choose “Generate EM” inExecutable class dropdown list.
  24. Select “Generate SalesInvoice EM”
  25. In General fast tab choose “Generate EM” inExecutable class dropdown list.


Multiple GSTINs in a single entity

Certain businesses were suffering from inability toparameterize the system to enter a separate set of credentials used forintegration with IRP per GSTIN. With this update, besides single set ofcredentials that can be entered in Accounts receivable > Setup >Electronic invoices parameters and still being used as a default set, youcan use Enterprise tax registration numbers form to enter User name,User password, Client ID, Client Secret and Certificate secrets perGSTIN registration number.

Complete the below procedure to enable multiple GSTINs support:

  1. Go to Tax > Setup > Salestax > Enterprise tax registration numbers
  2. If you do not have any GSTIN type registration numbers, create a newrecord. Otherwise go to step number 5.
  3. Select Taxtype = GST, Type = GSTIN and Registration numbertype = Company
  4. Enter the Registration number and save the data
  5. Expand the eInvoice parameters fast tab
  6. Enter the parameters used as credentials: User name, User password, ClientID, Client Secret andCertificate.
  7. Savethe data and close the form.



Note: The new fast tab eInvoice parameters in Enterprise tax registration numbers form is available only when all followingconditions are met: Tax type = GST, Type = GSTIN, Registration number type =Company and the user has full access rights to the menu item which opens the formElectronic invoices parameters (India).


When you send an invoice forregistration at IRP, the system is first trying to obtain parameters from Enterprisetax registration numbers for the seller GSTIN of the electronic invoice. Incase these settings are not found, the system will use parameters from Electronicinvoices parameters (India).These global parameters will be used only when GSTIN in these settings is thesame as the seller GSTIN of the electronic invoice that is being sent. Ifglobal settings have different GSTIN, it means that there were no credentialsfound that can be used for communication with IRP, and the error will be shown:


Note: The Infolog contains GSTIN of the invoiceseller to understand which GSTIN is missing setup and \ or requires additionalregistration at IRP under your PAN.


Electronic invoices for stock transfer orders

The stock transfer orders are now enabled to createelectronic invoices and cancel previously registered invoices.

Register invoice for stock transfer order

Complete the below procedure to register an electronicinvoice for a stock transfer order:

1.     Create and post shipment for a stocktransfer order in Inventory management > Outbound orders > Transferorder. Process details are described in the Stocktransfer orders for India article.

Note: Electronic invoice will becreated and ready for sending for any posted shipment when GST is computed, andthe transfer between different GSTINs takes place.

2.     Click Transfer order history button or goto Inventory management > Inquiries and reports > Transfer orders >Transfer order history.


3.     Use E-invoice button to review theelectronic invoice status. Default eInvoice status is ‘Created’.

4.     To register invoice for stock transfer order, openTax > Inquiries and Report > Electronic messages > Electronic messagespage

5.     Select OnlineInvoicing processing

6.     Use Run processing function to createelectronic invoices for all relevant posted documents and send them to IRP.

7.     Upon completion of processing you may use Originaldocument button to open Transfer order history form.


Note: Credit and debit notes are not applicable totransfer orders as stock transfer orders created manually can be posted onlywith positive quantities. If correction is needed, a new transfer order withswapped from – to warehouses should be created.

Cancel invoice for stock transfer order

The cancelation procedure may be conducted in two ways.Complete the below procedure to manually cancel the invoice previouslyregistered at IRP.

  1. Go to Inventory management > Inquiries andreports > Transfer orders > Transfer order history and select sentelectronically transfer order for which you want to cancel the invoice
  2. Use E-invoice button to open theelectronic invoice status form

  3. Use Cancel function to select apreviously successfully registered invoice for cancelation


Note: Status will be updated to“Cancel”


There is other option to handle cancelation when a feature“Transfer Order Cancelation” is available and enabled in the Feature management.Once it is enabled, there is a possibility to cancel a shipment.

  1. Go to Inventory management > Inquiries andreports > Transfer orders > Transfer order history and select theshipment for cancelation
  2. Use Cancel button and confirm shipmentcancelation


    Note: You will see an extra linecreated in Transfer order history. The original shipment transfer e-invoicewill be auto-marked for cancelation.


  3. Use E-invoice button to review the statusof the electronic invoice



Regardless of the process followed to mark an invoice forcancelation, please follow these steps to cancel invoice at IRP:

  1. Open Tax > Inquiries and Report >Electronic messages > Electronic messages page
  2. Select CancelInvoice processing
  3. Use Run processing function to cancel allelectronic invoices selected for cancelation

Other improvements

Better traceability of e-Invoices

The details for documents in Customer invoice and Projectinvoice journals as well as Transfer order history journal have an indicationthat a document was sent electronically. You can open any of referred forms toinquire on that and filter documents which are not sent electronically. Thestatus is updated upon successful registration of the invoice.


Improved management of e-invoice status

Now apart from previously available process of auto-creating e-invoicestatus ‘Created’ for the documents posted with customer enabled for electronicinvoice, there is a new function Accounts receivable > Periodic task >Create e-invoice status which allows you to override all the criteria exceptone – the document must not be marked as “sent electronically” what mean itcould not be registered at IRP earlier.




You can follow the below procedure to bulk create electronicinvoices for sending and define recurrency:

  1. Go to Accounts receivable > Periodic task> Create e-invoice status
  2. Expand Records to include and click Filterto apply any required criteria to filter only invoices which need to besent to IRP

  3. Expand Run in the background to defineRecurrence and run function in batch processing.


This procedure can be used for the documents posted prior tothe installation of this application update. In all the cases it is assumedthat the posted document \ invoice contains all the required information.Existence of all the mandatory data can be confirmed by reviewing inquiry forms(e.g. invoice journal header \ lines, tax document etc.) or printing the GSTinvoice.

Updated E-invoice status form

There are additional functions available in E-invoice formwhich can be opened for any applicable posted invoice in customer invoice,project invoice or transfer order history journal.


Message item open – opens electronic message items pageto review message status, applicable processing, or attachments for electronicmessage.

Cancel – available previously function to mark thedocument for cancelation. Now there is a dialog to confirm that you want to completethis operation, since the operation can’t be reverted.

Delete – if the e-invoice status was created forposted document which should not be registered at IRP, it is possible to deletethe status to remove the invoice from processing.


Note: Availability of functions depends on thedocument status and its processing stage. Message item button is onlyavailable when any processing was run and message items were created, Cancelbutton is available only for previously successfully registered invoice at IRPand Delete is available only for status ‘Created’, until invoice is successfullyregistered at IRP.

Trouble shooting and re-processing of messages witherrors

Running ‘OnlineInvoicng’ and ‘CancelInvoice’ processing mayresult in unsuccessful completion of the actions. Those messages will not beprocessed again until errors are reviewed, corrected if needed where possible,and mark the message as ready for re-processing.

Reviewing the errors

  1. Open Tax > Inquiries and Report >Electronic messages > Electronic messages page
  2. Select OnlineInvoicing processing
  3. In the Messages table select any message thathas Error status
  4. In the Action log table you can see the list ofactions that were taken for your message. The last Action log item should havea Response code and a Response description.



This message has status “Error token response importing”. Itmeans that you should check your KeyVault credentials for Client-ID andClient-Secret. After you have fixed your credentials you can proceed withmessage re-processing.


Select a message with an Error status and click on “Updatestatus” button in the Messages table action pane. This will show you Updatestatus dialog:


The default values of this dialog:

  1. Action is set to “Process Error Messages”
  2. New status is set to “Evaluated”

If you want to bulk process messages with Errors, you cansimply remove criteria from the Filter in “Records to include” section.

After you click OK, your message(s) status will be set to“Evaluated”. This means that you can run the processing again and see if theerror is gone.


Debit note identification

The electronic invoice message according to thespecification may contain only positive quantities and amounts regardless ofdocument type: invoice, credit note and debit note. Issued document isconsidered as a credit or a debit note when there is an association of theoriginal transaction reference in a respective Tax document for the invoice. Issueddocument is considered as a credit note even without the mentioned associationin case its total amount is negative.

Example of Tax document for Free text invoice debit note:


Document is sent as a credit note (CRN) when there isoriginal transaction id \ date reference, and the total invoice amount isnegative. It is sent as a debit note (DBN) when there is a reference, and thetotal invoice amount is equal of higher than 0. Regular invoice (INV) is sentin all other cases.


Encrypted QR code

The QR code that is printed in the GST invoice report aftersuccessful document registration, now represents signed and encryptedinformation to enable offline verification of invoices using Mobile App.


Mapping of electronic invoice data elements

You might have been receiving inappropriate and misleadingerrors and warnings while trying to register a document that has been postedwith accurate GSTINs, addresses and other information. Now all the dataelements in electronic invoice JSON format are mapped differently and in orderto ensure all-the-time consistency with printed GST invoice are using the samedata sources as the printable form (report data providers). Be sure youcompleted steps in prerequisites to make sure new configurations and mappingsare used.


Configurable eInvoice tax components

Proper mapping for eInvoice tax components is required toindicate classification of configurable GST components in the electronicinvoice. This mapping is done is an Electronicreporting configuration. Complete the following procedure to review orupdate eInvoice tax components mapping.

  1. Go to Organization administration >Electronic reporting workspace
  2. Create and activate your configurationprovider
  3. Open Reporting configurations and find GSTInvoice format (IN) in the configuration tree
  4. Open Designer and switch to the Mapping tab
  5. Expand the Constants container


This is the set of currently supported tax components. Each constant is a string with the name of a corresponding component.You can see the string representing the tax component by selecting each and clickingEdit – Edit formula. If your system has Tax components with custom names,please derive this configuration, update the constants, complete theconfiguration and use your new configuration in Executable class settings and invalidation format at Electronic invoice parameters.