Connectors Reference

DocumentsCorePack

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!

 

Status: Preview

Tier: Premium

Version: 1.0 beta

 

Actions:

Name

Summary

AttachDocumentJobToEmail (JSONAttachDocumentJobToEmail body)

Attach DocumentJob to email

AttachDocumentJobToNote (JSONAttachDocumentJobToNote body)

Attach DocumentJob as note

AttachFileToEmail (JSONAttachFileToEmail body)

Attach file to email

AttachFileToNote (JSONAttachFileToNote body)

Attach file as note

ConcatenateDocumentJobs (JSONConcatDocumentJob body)

Concatenate two Document Jobs

ConcatenateFiles (JSONConcatFiles body)

Concatenate two Files (pdf,docx)

CreateDocumentJob (string TemplateId, string EntityId, string FileType, [Optional]integer TimeOut, [Optional]string UserId, [Optional]boolean SaveToSharepoint, [Optional]string DCPPrinterName, [Optional]boolean DeactivateOnTimeout)

Create Document Job (sync)

CreateDocumentJobAsync (string TemplateId, string EntityId, string FileType, [Optional]string UserId, [Optional]boolean SaveToSharepoint, [Optional]string DCPPrinterName)

Create Document Job (async)

CreateDocumentJobXmlBased ([Optional]JSONMultiPartRequest body)

Create Document Job based on an XML (sync)

CreateDocumentJobXmlBasedAsync ([Optional]JSONMultiPartRequest body)

Create Document Job based on an XML (async)

DocumentJobResult (string DocumentJobId, [Optional]boolean DeactivateOnTimeout)

Get DocumentJob Result

DocumentJobStatus (string DocumentJobId, [Optional]boolean DeactivateOnTimeout)

Get DocumentJob Status

GetAllTemplates ([Optional]string EntityName, [Optional]string TemplateNameFilter, [Optional]string GroupFilter, [Optional]string UserId)

Get Templates

GetCombineTypes ()

Get DCP CombineTypes for DocumentConcatenation

GetConcatenationOutputTypes ()

Get Concatenation ResultTypes

GetDCPActions ()

Available DCP Actions

GetEntityNames ()

Retrieve EntityNames with annotation capability

GetFileTypes ()

Get DCP FileTypes

GetPrinters ([Optional]string User)

Get DCP Printer

GetSingleTemplate ([Optional]string TemplateNameFilter, [Optional]string GroupFilter, [Optional]string EntityName, [Optional]string UserId)

Get Single Template

GetUsers ()

Get a list of dynamics users

GetXmlBasedFileTypes ()

Get DCP FileTypes for XmlBased generation

IsServiceAlive ()

IsServiceAlive

Ping ()

Check API Availibility

PrintDocumentJob (string DocumentJobId, string DCPPrinterName, [Optional]boolean DeactivateOnTimeout)

Print DocumentJob

PrintFile (JSONPrintDocumentRequest body)

Print File

SendEmail ([Optional]JSONSendEmail body)

Send email

WhoAmI ()

WhoAmI

 

Triggers:

Name

Summary

 

Objects:

Name

Summary

DocumentJobResponse

 

DocumentJobStatusResponse

 

JSONAttachDocumentJobToEmail

 

JSONAttachDocumentJobToNote

 

JSONAttachFileToEmail

 

JSONAttachFileToNote

 

JSONConcatDocumentJob

 

JSONConcatFiles

 

JSONCreateNoteResponse

 

JSONDCPTemplate

 

JSONEntityName

 

JSONKeyValuePair

 

JSONLookup

 

JSONMultiPartRequest

 

JSONPrintDocumentRequest

 

JSONPrinterResponse

 

JSONSendEmail

 

JSONSystemUser

 

StringInt32KeyValuePair

 

UserMessage

 

WhoAmi

 

 

Actions:

AttachDocumentJobToEmail

Summary: Attach DocumentJob to email

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

 

Syntax:

DocumentsCorePack.AttachDocumentJobToEmail (JSONAttachDocumentJobToEmail body)

 

Parameters:

Name

Type

Summary

Required

Related Action

body

JSONAttachDocumentJobToEmail

 

 

True

 

Returns:

          Type:DocumentJobStatusResponse

 

AttachDocumentJobToNote

Summary: Attach DocumentJob as note

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

 

Syntax:

DocumentsCorePack.AttachDocumentJobToNote (JSONAttachDocumentJobToNote body)

 

Parameters:

Name

Type

Summary

Required

Related Action

body

JSONAttachDocumentJobToNote

 

 

True

 

Returns:

          Type:JSONCreateNoteResponse

 

AttachFileToEmail

Summary: Attach file to email

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

 

Syntax:

DocumentsCorePack.AttachFileToEmail (JSONAttachFileToEmail body)

 

Parameters:

Name

Type

Summary

Required

Related Action

body

JSONAttachFileToEmail

 

 

True

 

Returns:

          Type:DocumentJobStatusResponse

 

AttachFileToNote

Summary: Attach file as note

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

 

Syntax:

DocumentsCorePack.AttachFileToNote (JSONAttachFileToNote body)

 

Parameters:

Name

Type

Summary

Required

Related Action

body

JSONAttachFileToNote

 

 

True

 

Returns:

          Type:JSONCreateNoteResponse

 

ConcatenateDocumentJobs

Summary: Concatenate two Document Jobs

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

 

Syntax:

DocumentsCorePack.ConcatenateDocumentJobs (JSONConcatDocumentJob body)

 

Parameters:

Name

Type

Summary

Required

Related Action

body

JSONConcatDocumentJob

 

 

True

 

Returns:

          Type:DocumentJobResponse

 

ConcatenateFiles

Summary: Concatenate two Files (pdf,docx)

Description: Concatenates two supplied files (pdf,docx)

 

Syntax:

DocumentsCorePack.ConcatenateFiles (JSONConcatFiles body)

 

Parameters:

Name

Type

Summary

Required

Related Action

body

JSONConcatFiles

 

 

True

 

Returns:

          Type:DocumentJobResponse

 

CreateDocumentJob

Summary: Create Document Job (sync)

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

 

Syntax:

DocumentsCorePack.CreateDocumentJob (string TemplateId, string EntityId, string FileType, [Optional]integer TimeOut, [Optional]string UserId, [Optional]boolean SaveToSharepoint, [Optional]string DCPPrinterName, [Optional]boolean DeactivateOnTimeout)

 

Parameters:

Name

Type

Summary

Required

Related Action

TemplateId

string(uuid)

(TemplateId)

Select the template for this document job

True

GetAllTemplates

EntityId

string(uuid)

(EntityId)

Dynamics 365 source record id

True

FileType

string

(FileType)

Select a filetype for the document result

True

GetFileTypes

TimeOut

integer(int32)

(TimeOut)

Max. time to wait for document

False

UserId

string

(UserId)

Optional, supply Dynamics 365 users domainname or id

False

GetUsers

SaveToSharepoint

boolean

(SaveToSharepoint)

Optional, save document to sharepoint

False

DCPPrinterName

string

(DCPPrinterName)

Optional, Select the DCP printer for a PrintDocument operation

False

GetPrinters

DeactivateOnTimeout

boolean

(DeactivateOnTimeout)

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

False

 

Returns:

          Type:DocumentJobResponse

 

CreateDocumentJobAsync

Summary: Create Document Job (async)

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

 

Syntax:

DocumentsCorePack.CreateDocumentJobAsync (string TemplateId, string EntityId, string FileType, [Optional]string UserId, [Optional]boolean SaveToSharepoint, [Optional]string DCPPrinterName)

 

Parameters:

Name

Type

Summary

Required

Related Action

TemplateId

string(uuid)

(TemplateId)

Select the template for this document job

True

GetAllTemplates

EntityId

string(uuid)

(EntityId)

Dynamics 365 source record id

True

FileType

string

(FileType)

Select a filetype for the document result

True

GetFileTypes

UserId

string

(UserId)

Optional, the user to run this operation

False

GetUsers

SaveToSharepoint

boolean

(SaveToSharepoint)

Optional, save document to sharepoint

False

DCPPrinterName

string

(DCPPrinterName)

Optional, Select the printer for a PrintDocument operation

False

GetPrinters

 

Returns:

          Type:DocumentJobStatusResponse

 

CreateDocumentJobXmlBased

Summary: Create Document Job based on an XML (sync)

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

 

Syntax:

DocumentsCorePack.CreateDocumentJobXmlBased ([Optional]JSONMultiPartRequest body)

 

Parameters:

Name

Type

Summary

Required

Related Action

body

JSONMultiPartRequest

 

 

False

 

Returns:

          Type:DocumentJobResponse

 

CreateDocumentJobXmlBasedAsync

Summary: Create Document Job based on an XML (async)

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

 

Syntax:

DocumentsCorePack.CreateDocumentJobXmlBasedAsync ([Optional]JSONMultiPartRequest body)

 

Parameters:

Name

Type

Summary

Required

Related Action

body

JSONMultiPartRequest

 

 

False

 

Returns:

          Type:DocumentJobStatusResponse

 

DocumentJobResult

Summary: Get DocumentJob Result

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

 

Syntax:

DocumentsCorePack.DocumentJobResult (string DocumentJobId, [Optional]boolean DeactivateOnTimeout)

 

Parameters:

Name

Type

Summary

Required

Related Action

DocumentJobId

string(uuid)

(DocumentJobId)

Guid of the DocumentJob Id to retrieve the result of

True

DeactivateOnTimeout

boolean

(DeactivateOnTimeout)

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

False

 

Returns:

          Type:DocumentJobResponse

 

DocumentJobStatus

Summary: Get DocumentJob Status

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

 

Syntax:

DocumentsCorePack.DocumentJobStatus (string DocumentJobId, [Optional]boolean DeactivateOnTimeout)

 

Parameters:

Name

Type

Summary

Required

Related Action

DocumentJobId

string(uuid)

(DocumentJobId)

Guid of the DocumentJob Id to retrieve the status of

True

DeactivateOnTimeout

boolean

(DeactivateOnTimeout)

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

False

 

Returns:

          Type:DocumentJobStatusResponse

 

GetAllTemplates

Summary: Get Templates

Description: This function returns a list of available DocumentsCorePack Templates

 

Syntax:

DocumentsCorePack.GetAllTemplates ([Optional]string EntityName, [Optional]string TemplateNameFilter, [Optional]string GroupFilter, [Optional]string UserId)

 

Parameters:

Name

Type

Summary

Required

Related Action

EntityName

string

(EntityName)

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

False

TemplateNameFilter

string

(TemplateNameFilter)

Filter by template name. Optional wildcard *[name]*

False

GroupFilter

string

(GroupFilter)

Filter by group name. Optional wildcard *[name]*

False

UserId

string

(UserId)

Only retrieve templates accessible to this user

False

GetUsers

 

Returns:

          Type:array of (JSONDCPTemplate)

 

GetCombineTypes

Summary: Get DCP CombineTypes for DocumentConcatenation

Description: This function returns a list of supported CombineTypes for DocumentsCorePack

 

Syntax:

DocumentsCorePack.GetCombineTypes ()

 

Returns:

          Type:array of (JSONKeyValuePair)

 

GetConcatenationOutputTypes

Summary: Get Concatenation ResultTypes

Description: This function returns a list of supported ResultTypes for Concatenation

 

Syntax:

DocumentsCorePack.GetConcatenationOutputTypes ()

 

Returns:

          Type:array of (JSONKeyValuePair)

 

GetDCPActions

Summary: Available DCP Actions

Description: This function returns a list of supported actions for DocumentsCorePack

 

Syntax:

DocumentsCorePack.GetDCPActions ()

 

Returns:

          Type:array of (StringInt32KeyValuePair)

 

GetEntityNames

Summary: Retrieve EntityNames with annotation capability

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

 

Syntax:

DocumentsCorePack.GetEntityNames ()

 

Returns:

          Type:array of (JSONEntityName)

 

GetFileTypes

Summary: Get DCP FileTypes

Description: This function returns a list of supported filetype for DocumentsCorePack

 

Syntax:

DocumentsCorePack.GetFileTypes ()

 

Returns:

          Type:array of (JSONKeyValuePair)

 

GetPrinters

Summary: Get DCP Printer

Description: Retrieve available printer names, optionally filtered by user

 

Syntax:

DocumentsCorePack.GetPrinters ([Optional]string User)

 

Parameters:

Name

Type

Summary

Required

Related Action

User

string

(User)

Optional, supply Dynamics 365 users domainname or id

False

 

Returns:

          Type:array of (JSONPrinterResponse)

 

GetSingleTemplate

Summary: Get Single Template

Description: This function returns the first of the filtered DocumentsCorePack Templates

 

Syntax:

DocumentsCorePack.GetSingleTemplate ([Optional]string TemplateNameFilter, [Optional]string GroupFilter, [Optional]string EntityName, [Optional]string UserId)

 

Parameters:

Name

Type

Summary

Required

Related Action

TemplateNameFilter

string

(TemplateNameFilter)

Filter by template name. Optional wildcard *[name]*

False

GroupFilter

string

(GroupFilter)

Filter by GroupName. Optional wildcard *[group]*

False

EntityName

string

(EntityName)

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

False

UserId

string

(UserId)

Only retrieve templates accessible to this user

False

GetUsers

 

Returns:

          Type:JSONDCPTemplate

 

GetUsers

Summary: Get a list of dynamics users

Description: list of dynamics users

 

Syntax:

DocumentsCorePack.GetUsers ()

 

Returns:

          Type:JSONSystemUser

 

GetXmlBasedFileTypes

Summary: Get DCP FileTypes for XmlBased generation

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

 

Syntax:

DocumentsCorePack.GetXmlBasedFileTypes ()

 

Returns:

          Type:array of (JSONKeyValuePair)

 

IsServiceAlive

Summary: IsServiceAlive

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

 

Syntax:

DocumentsCorePack.IsServiceAlive ()

 

Returns:

          Type:UserMessage

 

Ping

Summary: Check API Availibility

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

 

Syntax:

DocumentsCorePack.Ping ()

 

Returns:

          Type:UserMessage

 

PrintDocumentJob

Summary: Print DocumentJob

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

 

Syntax:

DocumentsCorePack.PrintDocumentJob (string DocumentJobId, string DCPPrinterName, [Optional]boolean DeactivateOnTimeout)

 

Parameters:

Name

Type

Summary

Required

Related Action

DocumentJobId

string(uuid)

(DocumentJobId)

Guid of the DocumentJob Id to print

True

DCPPrinterName

string

(DCPPrinterName)

DCP Printername of the printer to use

True

GetPrinters

DeactivateOnTimeout

boolean

(DeactivateOnTimeout)

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

False

 

Returns:

          Type:DocumentJobStatusResponse

 

PrintFile

Summary: Print File

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

 

Syntax:

DocumentsCorePack.PrintFile (JSONPrintDocumentRequest body)

 

Parameters:

Name

Type

Summary

Required

Related Action

body

JSONPrintDocumentRequest

 

 

True

 

Returns:

          Type:DocumentJobStatusResponse

 

SendEmail

Summary: Send email

Description: Send the specified email

 

Syntax:

DocumentsCorePack.SendEmail ([Optional]JSONSendEmail body)

 

Parameters:

Name

Type

Summary

Required

Related Action

body

JSONSendEmail

 

 

False

 

Returns:

          Type:DocumentJobStatusResponse

 

WhoAmI

Summary: WhoAmI

Description: Returns information about the currently used API Key and assoicated Service

 

Syntax:

DocumentsCorePack.WhoAmI ()

 

Returns:

          Type:WhoAmi

 


 

DocumentJobResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

File name

string

 

 

File size

integer(int32)

 

 

Document (Base64 encoded)

string

 

 

Mime-Type

string

 

 

Temporary Record Id

string

 

 

Success

boolean

 

 

Return value

string

 

 

Return value 2

string

 

 

DocumentJobId

string

 

 


 

DocumentJobStatusResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

Success

boolean

 

 

Return value

string

 

 

Return value 2

string

 

 

DocumentJobId

string

 

 


 

JSONAttachDocumentJobToEmail

Summary:

Description:

 

          Properties:

Name

Type

Summary

DocumentJobId

string

 

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

EmailId

string

 

The email the document should be attached to

UserId

string

 

 

DeactivateOnTimeout

boolean

 

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


 

JSONAttachDocumentJobToNote

Summary:

Description:

 

          Properties:

Name

Type

Summary

DocumentJobId

string

 

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

Note description

string

 

Set this text as Notes description

Note subject

string

 

Set this text as Notes subjects

Entity Id

string

 

The Guid of the entity to attach the note to

Schemaname

string

 

 

UserId

string

 

 

DeactivateOnTimeout

boolean

 

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


 

JSONAttachFileToEmail

Summary:

Description:

 

          Properties:

Name

Type

Summary

Document (base64)

string

 

A base64 encoded string representing the files content

Filename

string

 

The filename to use for storing the file

Mime-Type

string

 

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

EmailId

string

 

The email the document should be attached to

UserId

string

 

 

DeactivateOnTimeout

boolean

 

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


 

JSONAttachFileToNote

Summary:

Description:

 

          Properties:

Name

Type

Summary

Document (base64)

string

 

A base64 encoded string representing the files content

Filename

string

 

The filename to use for storing the file

Mime-Type

string

 

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

Note description

string

 

Set this text as Notes description

Note subject

string

 

Set this text as Notes subjects

Entity Id

string

 

The Guid of the entity to attach the note to

Schemaname

string

 

 

UserId

string

 

 

DeactivateOnTimeout

boolean

 

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


 

JSONConcatDocumentJob

Summary:

Description:

 

          Properties:

Name

Type

Summary

First DocumentJob

string(uuid)

 

First DocumentJobId of ConcatenationJob

Second DocumentJob

string(uuid)

 

Second DocumentJobId of ConcatenationJob

CombineType

integer(int32)

 

 

OutputFileType

integer(int32)

 

 

DeactivateOnTimeout

boolean

 

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

UserId

string

 

 


 

JSONConcatFiles

Summary:

Description:

 

          Properties:

Name

Type

Summary

First Filename

string

 

The filename of the first document

First Mime-Type

string

 

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

First Document (base64)

string

 

A base64 encoded string representing the first document content

Second Filename

string

 

The filename of the second document

Second Mime-Type

string

 

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

Second Document (base64)

string

 

A base64 encoded string representing the second document content

CombineType

integer(int32)

 

 

OutputFileType

integer(int32)

 

 

DeactivateOnTimeout

boolean

 

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

UserId

string

 

 


 

JSONCreateNoteResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

annotationid

string

 

 

Success

boolean

 

 

Return value

string

 

 

Return value 2

string

 

 


 

JSONDCPTemplate

Summary:

Description:

 

          Properties:

Name

Type

Summary

ptm_mscrmaddons_dcptemplatesid

string

 

 

ptm_name

string

 

 

ptm_entitytype

string

 

 


 

JSONEntityName

Summary:

Description:

 

          Properties:

Name

Type

Summary

DisplayName

string

 

 

LogicalName

string

 

 


 

JSONKeyValuePair

Summary:

Description:

 

          Properties:

Name

Type

Summary

key

string

 

 

value

integer(int32)

 

 


 

JSONLookup

Summary:

Description:

 

          Properties:

Name

Type

Summary

Id

string(uuid)

 

 

Schemaname

string

 

 


 

JSONMultiPartRequest

Summary:

Description:

 

          Properties:

Name

Type

Summary

MultiPartXml

string

 

Multipart XML document for the DocumentJob

TimeOut

integer(int32)

 

 

UserId

string

 

 

DeactivateOnTimeout

boolean

 

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


 

JSONPrintDocumentRequest

Summary:

Description:

 

          Properties:

Name

Type

Summary

Document (base64)

string

 

A base64 encoded string representing the files content

Filename

string

 

The filename to use for storing the file

DCPPrinterName

string

 

 

DeactivateOnTimeout

boolean

 

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


 

JSONPrinterResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

DCPPrinterName

string

 

 


 

JSONSendEmail

Summary:

Description:

 

          Properties:

Name

Type

Summary

EmailToSend

string

 

Guid of email to send

UserId

string

 

 

Sender (userid)

string(uuid)

 

Guid of email sender

Sender (Schemaname)

string

 

Schemaname of the sender, empty value defaults to systemuser

Regarding (Id)

string(uuid)

 

Guid of the entity to set as regarding

Regarding (Schemaname)

string

 

 

To

array of (JSONLookup)

 

The emails TO recipient list

CC

array of (JSONLookup)

 

The emails CC recipient list

BCC

array of (JSONLookup)

 

The emails BCC recipient list

DeactivateOnTimeout

boolean

 

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


 

JSONSystemUser

Summary:

Description:

 

          Properties:

Name

Type

Summary

systemuserid

string

 

 

fullname

string

 

 

domainname

string

 

 

azureactivedirectoryobjectid

string

 

 


 

StringInt32KeyValuePair

Summary:

Description:

 

          Properties:

Name

Type

Summary

Key

string

 

 

Value

integer(int32)

 

 


 

UserMessage

Summary:

Description:

 

          Properties:

Name

Type

Summary

Message

string

 

 


 

WhoAmi

Summary:

Description:

 

          Properties:

Name

Type

Summary

ApiKey

string

 

 

ApiOwner

string