DocumentsCorePack (Preview)

DocumentsCorePack is a fast & simple document generation based on Dynamics 365 data. Based on MS Word - templates, DocumentsCorePack provides you with a set of tools to create and process documents effectively.From a document generation wizard that guides users through the process to full document automation - DocumentsCorePack will make your business documents look professional and help you to process them efficiently!

This connector is available in the following products and regions:

Service Class Regions
Logic Apps Standard All Logic Apps regions except the following:
     -   Azure Government regions
     -   Azure China regions
Power Automate Premium All Power Automate regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
Power Apps Premium All Power Apps regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
Contact
Name mscrm-addons.com
Email support@mscrm-addons.com
Connector Metadata
Publisher PTM EDV Systeme GmbH

Pre-requisites

You need to have a Dynamics 365 or Common Data Service environment.

First of all, you need to

Get the API Key for your environment:

Now you are ready to start using DocumentsCorePack.

If you have troubles please look into following article or send your questions per email to support@mscrm-addons.com

Creating a connection

To connect your account, you will need the following information:

Name Type Description
API Key securestring

The API Key for this api

Throttling Limits

Name Calls Renewal Period
API calls per connection10060 seconds

Actions

Attach DocumentJob as note

Attach the file generated by a DocumentJob as a note to a Dynamics 365 entity. Attention! The documentjob must already be finished

Attach DocumentJob to email

Attach the file generated by a DocumentJob as attachment to a Dynamics 365 email

Attach file as note

Attach the file supplied as base64 string as a note to a Dynamics 365 entity. Attention! The documentjob must already be finished

Attach file to email

Attach the file supplied as base64 string as attachment to a Dynamics 365 email

Available DCP Actions

This function returns a list of supported actions for DocumentsCorePack

Check API Availibility

Verifies, that the API endpoint is currently accessible. Does not require API Key

Concatenate two Document Jobs

Concatenate two files (pdf,docx) generated by two document jobs

Concatenate two Files (pdf,docx)

Concatenates two supplied files (pdf,docx)

Create Document Job (async)

This function creates a new document job.. Attention! The function does NOT wait for a result

Create Document Job (sync)

This function creates a new document job and waits for the result for up to [TimeOut] seconds

Create Document Job based on an XML (async)

This function creates a new document job. Attention! The function does NOT wait for a result

Create Document Job based on an XML (sync)

This function creates a new document job and waits for the result for up to [TimeOut] seconds

Get a list of dynamics users

list of dynamics users

Get Concatenation ResultTypes

This function returns a list of supported ResultTypes for Concatenation

Get DCP CombineTypes for DocumentConcatenation

This function returns a list of supported CombineTypes for DocumentsCorePack

Get DCP FileTypes

This function returns a list of supported filetype for DocumentsCorePack

Get DCP FileTypes for XmlBased generation

This function returns a list of supported filetype for DocumentsCorePack XmlBased generation

Get DCP Printer

Retrieve available printer names, optionally filtered by user

Get DocumentJob Result

Retrieves a DocumentJobs status information. The result will include the result document, if the job is finished

Get DocumentJob Status

Retrieves the status of a DocumentJob. Dynamics 365 state/statuscode rules apply

Get Single Template

This function returns the first of the filtered DocumentsCorePack Templates

Get Templates

This function returns a list of available DocumentsCorePack Templates

IsServiceAlive

returns true, if the service has been responsive recently, false, if not.

Print DocumentJob

Print a Document generated by a DocumentJob. Attention! The documentjob must already be finished

Print File

Prints a file supplied as base64 encoded string. Supported file-formats are PDF and DOCX

Retrieve EntityNames with annotation capability

This function returns a list of all Dynamics 365 entities, that support annotations

Send email

Send the specified email

WhoAmI

Returns information about the currently used API Key and assoicated Service

Attach DocumentJob as note

Attach the file generated by a DocumentJob as a note to a Dynamics 365 entity. Attention! The documentjob must already be finished

Parameters

Name Key Required Type Description
DocumentJobId
DocumentJobId True string

The DocumentJob ID of the generated document to attach to the note

Note description
Note description string

Set this text as Notes description

Note subject
Note subject string

Set this text as Notes subjects

Entity Id
Entity Id True string

The Guid of the entity to attach the note to

Schemaname
Schemaname True string

The DocumentJob ID of the generated document to attach to the note

UserId
UserId string

The DocumentJob ID of the generated document to attach to the note

DeactivateOnTimeout
DeactivateOnTimeout boolean

Deactivates the working item on a timeout, preventing the document generation

Returns

Attach DocumentJob to email

Attach the file generated by a DocumentJob as attachment to a Dynamics 365 email

Parameters

Name Key Required Type Description
DocumentJobId
DocumentJobId True string

The DocumentJob ID of the generated document to attach to the email

EmailId
EmailId True string

The email the document should be attached to

UserId
UserId string

The DocumentJob ID of the generated document to attach to the email

DeactivateOnTimeout
DeactivateOnTimeout boolean

Deactivates the working item on a timeout, preventing the document generation

Returns

Attach file as note

Attach the file supplied as base64 string as a note to a Dynamics 365 entity. Attention! The documentjob must already be finished

Parameters

Name Key Required Type Description
Document (base64)
Document (base64) True string

A base64 encoded string representing the files content

Filename
Filename True string

The filename to use for storing the file

Mime-Type
Mime-Type string

Content mime-type for handling of the file (e.g. application/text)

Note description
Note description string

Set this text as Notes description

Note subject
Note subject string

Set this text as Notes subjects

Entity Id
Entity Id True string

The Guid of the entity to attach the note to

Schemaname
Schemaname True string

A base64 encoded string representing the files content

UserId
UserId string

A base64 encoded string representing the files content

DeactivateOnTimeout
DeactivateOnTimeout boolean

Deactivates the working item on a timeout, preventing the document generation

Returns

Attach file to email

Attach the file supplied as base64 string as attachment to a Dynamics 365 email

Parameters

Name Key Required Type Description
Document (base64)
Document (base64) True string

A base64 encoded string representing the files content

Filename
Filename True string

The filename to use for storing the file

Mime-Type
Mime-Type string

Content mime-type for handling of the file (e.g. application/text)

EmailId
EmailId True string

The email the document should be attached to

UserId
UserId string

A base64 encoded string representing the files content

DeactivateOnTimeout
DeactivateOnTimeout boolean

Deactivates the working item on a timeout, preventing the document generation

Returns

Available DCP Actions

This function returns a list of supported actions for DocumentsCorePack

Returns

Check API Availibility

Verifies, that the API endpoint is currently accessible. Does not require API Key

Returns

Concatenate two Document Jobs

Concatenate two files (pdf,docx) generated by two document jobs

Parameters

Name Key Required Type Description
First DocumentJob
First DocumentJob True uuid

First DocumentJobId of ConcatenationJob

Second DocumentJob
Second DocumentJob True uuid

Second DocumentJobId of ConcatenationJob

CombineType
CombineType True integer

First DocumentJobId of ConcatenationJob

OutputFileType
OutputFileType True integer

First DocumentJobId of ConcatenationJob

DeactivateOnTimeout
DeactivateOnTimeout boolean

Deactivates the working item on a timeout, preventing the document generation

UserId
UserId string

First DocumentJobId of ConcatenationJob

Returns

Concatenate two Files (pdf,docx)

Concatenates two supplied files (pdf,docx)

Parameters

Name Key Required Type Description
First Filename
First Filename True string

The filename of the first document

First Mime-Type
First Mime-Type True string

Content mime-type for handling of the first document (e.g. application/pdf)

First Document (base64)
First Document (base64) True string

A base64 encoded string representing the first document content

Second Filename
Second Filename True string

The filename of the second document

Second Mime-Type
Second Mime-Type True string

Content mime-type for handling of the second document (e.g. application/pdf)

Second Document (base64)
Second Document (base64) True string

A base64 encoded string representing the second document content

CombineType
CombineType True integer

The filename of the first document

OutputFileType
OutputFileType True integer

The filename of the first document

DeactivateOnTimeout
DeactivateOnTimeout boolean

Deactivates the working item on a timeout, preventing the document generation

UserId
UserId string

The filename of the first document

Returns

Create Document Job (async)

This function creates a new document job.. Attention! The function does NOT wait for a result

Parameters

Name Key Required Type Description
TemplateId
TemplateId True uuid

Select the template for this document job

EntityId
EntityId True uuid

Dynamics 365 source record id

FileType
FileType True string

Select a filetype for the document result

UserId
UserId string

Optional, the user to run this operation

SaveToSharepoint
SaveToSharepoint boolean

Optional, save document to sharepoint

DCPPrinterName
DCPPrinterName string

Optional, Select the printer for a PrintDocument operation

Returns

Create Document Job (sync)

This function creates a new document job and waits for the result for up to [TimeOut] seconds

Parameters

Name Key Required Type Description
TemplateId
TemplateId True uuid

Select the template for this document job

EntityId
EntityId True uuid

Dynamics 365 source record id

FileType
FileType True string

Select a filetype for the document result

TimeOut
TimeOut integer

Max. time to wait for document

UserId
UserId string

Optional, supply Dynamics 365 users domainname or id

SaveToSharepoint
SaveToSharepoint boolean

Optional, save document to sharepoint

DCPPrinterName
DCPPrinterName string

Optional, Select the DCP printer for a PrintDocument operation

DeactivateOnTimeout
DeactivateOnTimeout boolean

Deactivates the working item on a timeout, preventing the document generation

Returns

Create Document Job based on an XML (async)

This function creates a new document job. Attention! The function does NOT wait for a result

Parameters

Name Key Required Type Description
MultiPartXml
MultiPartXml True string

Multipart XML document for the DocumentJob

TimeOut
TimeOut integer
UserId
UserId string

Multipart XML document for the DocumentJob

DeactivateOnTimeout
DeactivateOnTimeout boolean

Deactivates the working item on a timeout, preventing the document generation

Returns

Create Document Job based on an XML (sync)

This function creates a new document job and waits for the result for up to [TimeOut] seconds

Parameters

Name Key Required Type Description
MultiPartXml
MultiPartXml True string

Multipart XML document for the DocumentJob

TimeOut
TimeOut integer
UserId
UserId string

Multipart XML document for the DocumentJob

DeactivateOnTimeout
DeactivateOnTimeout boolean

Deactivates the working item on a timeout, preventing the document generation

Returns

Get a list of dynamics users

list of dynamics users

Returns

Get Concatenation ResultTypes

This function returns a list of supported ResultTypes for Concatenation

Returns

Get DCP CombineTypes for DocumentConcatenation

This function returns a list of supported CombineTypes for DocumentsCorePack

Returns

Get DCP FileTypes

This function returns a list of supported filetype for DocumentsCorePack

Returns

Get DCP FileTypes for XmlBased generation

This function returns a list of supported filetype for DocumentsCorePack XmlBased generation

Returns

Get DCP Printer

Retrieve available printer names, optionally filtered by user

Parameters

Name Key Required Type Description
User
User string

Optional, supply Dynamics 365 users domainname or id

Returns

Get DocumentJob Result

Retrieves a DocumentJobs status information. The result will include the result document, if the job is finished

Parameters

Name Key Required Type Description
DocumentJobId
DocumentJobId True uuid

Guid of the DocumentJob Id to retrieve the result of

DeactivateOnTimeout
DeactivateOnTimeout boolean

Deactivates the working item on a timeout, preventing the document generation

Returns

Get DocumentJob Status

Retrieves the status of a DocumentJob. Dynamics 365 state/statuscode rules apply

Parameters

Name Key Required Type Description
DocumentJobId
DocumentJobId True uuid

Guid of the DocumentJob Id to retrieve the status of

DeactivateOnTimeout
DeactivateOnTimeout boolean

Deactivates the working item on a timeout, preventing the document generation

Returns

Get Single Template

This function returns the first of the filtered DocumentsCorePack Templates

Parameters

Name Key Required Type Description
TemplateNameFilter
TemplateNameFilter string

Filter by template name. Optional wildcard [name]

GroupFilter
GroupFilter string

Filter by GroupName. Optional wildcard [group]

EntityName
EntityName string

Filter by Entity (etc or etn). Optional wildcard [etn]

UserId
UserId string

Only retrieve templates accessible to this user

Returns

Get Templates

This function returns a list of available DocumentsCorePack Templates

Parameters

Name Key Required Type Description
EntityName
EntityName string

Filter by Entity (etc or etn). Optional wildcard [etn]

TemplateNameFilter
TemplateNameFilter string

Filter by template name. Optional wildcard [name]

GroupFilter
GroupFilter string

Filter by group name. Optional wildcard [name]

UserId
UserId string

Only retrieve templates accessible to this user

Returns

IsServiceAlive

returns true, if the service has been responsive recently, false, if not.

Returns

Print a Document generated by a DocumentJob. Attention! The documentjob must already be finished

Parameters

Name Key Required Type Description
DocumentJobId
DocumentJobId True uuid

Guid of the DocumentJob Id to print

DCPPrinterName
DCPPrinterName True string

DCP Printername of the printer to use

DeactivateOnTimeout
DeactivateOnTimeout boolean

Deactivates the working item on a timeout, preventing the document generation

Returns

Prints a file supplied as base64 encoded string. Supported file-formats are PDF and DOCX

Parameters

Name Key Required Type Description
Document (base64)
Document (base64) True string

A base64 encoded string representing the files content

Filename
Filename True string

The filename to use for storing the file

DCPPrinterName
DCPPrinterName True string

A base64 encoded string representing the files content

DeactivateOnTimeout
DeactivateOnTimeout boolean

Deactivates the working item on a timeout, preventing the document generation

Returns

Retrieve EntityNames with annotation capability

This function returns a list of all Dynamics 365 entities, that support annotations

Returns

Send email

Send the specified email

Parameters

Name Key Required Type Description
EmailToSend
EmailToSend True string

Guid of email to send

UserId
UserId string

Guid of email to send

Sender (userid)
Sender (userid) uuid

Guid of email sender

Sender (Schemaname)
Sender (Schemaname) string

Schemaname of the sender, empty value defaults to systemuser

Regarding (Id)
Regarding (Id) uuid

Guid of the entity to set as regarding

Regarding (Schemaname)
Regarding (Schemaname) string

Guid of email to send

Id
Id uuid

Guid of email to send

Schemaname
Schemaname string

Guid of email to send

Id
Id uuid

Guid of email to send

Schemaname
Schemaname string

Guid of email to send

Id
Id uuid

Guid of email to send

Schemaname
Schemaname string

Guid of email to send

DeactivateOnTimeout
DeactivateOnTimeout boolean

Deactivates the working item on a timeout, preventing the document generation

Returns

WhoAmI

Returns information about the currently used API Key and assoicated Service

Returns

Body
WhoAmi

Definitions

DocumentJobStatusResponse

Name Path Type Description
Success
Success boolean
Return value
Return value string
Return value 2
Return value 2 string
DocumentJobId
DocumentJobId string

JSONCreateNoteResponse

Name Path Type Description
annotationid
annotationid string
Success
Success boolean
Return value
Return value string
Return value 2
Return value 2 string

DocumentJobResponse

Name Path Type Description
File name
File name string
File size
File size integer
Document (Base64 encoded)
Document (Base64 encoded) string
Mime-Type
Mime-Type string
Temporary Record Id
Temporary Record Id string
Success
Success boolean
Return value
Return value string
Return value 2
Return value 2 string
DocumentJobId
DocumentJobId string

JSONDCPTemplate

Name Path Type Description
ptm_mscrmaddons_dcptemplatesid
ptm_mscrmaddons_dcptemplatesid string
ptm_name
ptm_name string
ptm_entitytype
ptm_entitytype string

JSONKeyValuePair

Name Path Type Description
key
key string
value
value integer

StringInt32KeyValuePair

Name Path Type Description
Key
Key string
Value
Value integer

JSONEntityName

Name Path Type Description
DisplayName
DisplayName string
LogicalName
LogicalName string

JSONPrinterResponse

Name Path Type Description
DCPPrinterName
DCPPrinterName string

JSONSystemUser

Name Path Type Description
systemuserid
systemuserid string
fullname
fullname string
domainname
domainname string
azureactivedirectoryobjectid
azureactivedirectoryobjectid string

UserMessage

Name Path Type Description
Message
Message string

WhoAmi

Name Path Type Description
ApiKey
ApiKey string
ApiOwner
ApiOwner string