Document Generator
You can find description for Document generator module inside D7 documentation.
CRM REST methods used for documents are realized via AJAX controller classes. At the same time, controllers themselves and their actions are used within Document generator module, with queries for them used only in the CRM module. These queries convert input and output parameters in accordance with the new REST standard, with consideration of CRM module specifics.
Only the documents and templates that belong to the CRM module can be used when calling the document methods in the CRM context.
Specifics of the values passed
Providers
Document generator module uses full class name as a provider ID. Because the CRM module uses alphanumeric entity IDs, the REST engine was designed to use similar notation. If an input parameter name is entityTypeId, it will be assigned a numeric ID in the CRM module. The following IDs are currently available:
1 - lead
2 - deal
3 - contact
4 - company
5 - invoice
7 - estimate
14 - order
31 - new invoices
SPA also can be used: Document generator also uses their entityTypeId.
Filtration by deal pipelines
REST methods do not account for a template association with providers. That is, no error will occur if the request to generate document by template is sent with provider, to which this template has no association. It means that a template association to specific deal pipeline is not considered as well. If you want to specify a deal as provider, only numerical ID is specified (2) in all instances.
List of regions
Each template is associated with a specific country. List of countries is available and presently consists of the following countries:
ru - Russia
by - Belarus
kz - Kazakhstan
ua - Ukraine
br - Brazil
mx - Mexico
de - Germany
uk - United Kingdom
pl - Poland
Regions are managed in the documentgenerator section.