Generating documents for use with the document visibility feature
Forewarning
Generating Documents
The following method is used to create a new report communication entry.
In order to use this method, your profile must have been granted the "Create" permission for "Communication Workbench" (in Admin Portal, under (Undefined variable: CompoVariables_AP.Admin2) > <Functional Admin > ProfileName> > Info Hub > Communication Workbench).
| Service | Action | Endpoint | Output Sample |
|---|---|---|---|
| Gateway | POST | /api/report-communication/ | {Report Communication Item without id property} |
List of Available Parameters
This section details all the supported parameters to use to correctly execute the APIs methods.
| Parameter | Data Type | Info |
|---|---|---|
| id | Integer | Parameter form the nc_report table, included in GET requests but not taken into consideration for POST or PUT requests. |
| idFolder | Integer | Optional. This parameter is from the nc_report table. If not provided, -5 (root folder) is used |
| title | String | Mandatory. This is the report title. |
| description | String | Optional. |
| idReport | Integer | Mandatory. This parameter is from the k_reports table. |
| beginDate | DateTime | Optional. |
| endDate | DateTime | Optional. |
| receiver | Integer | Mandatory. Identifier of the population. |
| idParameterTable | Integer | Mandatory. This parameter is from the k_referential_tables_views table (find the registered parameter table previously created). |
| filteTemplateName | String | Mandatory (e.g. @PayeeCode@LastName) |
| format | String | Mandatory. The available formats are: "pdf", "excel" or "word". |
| period | String | Mandatory. The available periods are: "onetime", "week", "hour", "day" and "month". |
| day | Integer | Mandatory if the period is "week", "day" or "month" |
| hour | Integer | Mandatory if the period is "onetime". |
| zipEnabled | Boolean | Optional; false by default. |
| zipPdfGenerationEnabled | Boolean | Optional; false by default. |
| zipReceiver | Integer | Optional. Identifier of the population. |
| hideAsDefault | Boolean |
Optional; false by default. Used for document visibility management in the (Undefined variable: CompoVariables_WA.Inbox). To be used to generate documents, but not display them in Web App. Fore more information about the use of the document visibility feature, refer to Generating documents for use with the document visibility feature. |
| teamReviewAllowed | Boolean |
Optional. Used for document visibility management in the (Undefined variable: CompoVariables_WA.Inbox). To be used to allow the visibility of generated documents to be managed using the document visibility feature in (Undefined variable: CompoVariables_WA_Alternate."Inbox"). Fore more information about the use of the document visibility feature, refer to Generating documents for use with the document visibility feature. |
| useProfileAccess | Boolean |
Optional; false by default. Used for document visibility management in the (Undefined variable: CompoVariables_WA.Inbox). To be used to limit the visibility of documents to certain profiles only. This parameter is checked by the application when the logged in user opens the "Team Documents" tab and when they attempt to grant access (individually or in bulk) or revoke access (individually or in bulk) to the documents using the Web App interface. |
| profileAccess | String |
Optional. Use array. Used for document visibility management in the (Undefined variable: CompoVariables_WA.Inbox). To be used to define the list of profiles that will have access to generated documents, when useProfileAccess is set to true. Values must be taken from the primary key in k_profiles. This parameter is checked by the application when the logged in user opens the "Team Documents" tab and when they attempt to grant access (individually or in bulk) or revoke access (individually or in bulk) to the documents using the Web App interface. |
Updating the Profile Access Configuration of a Communication Entry
When document have been generated with a certain specification regarding profile access, it is still possible to change the profile access configuration afterward in order to add or remove profiles.
To do so, use the method outlined below.
In order to use this method, your profile must have been granted the "Modify" permission for "Communication Workbench" (in Admin Portal, under (Undefined variable: CompoVariables_AP.Admin2) > <Functional Admin > ProfileName> > Info Hub > Communication Workbench).
| Service | Action | Endpoint | Body Sample |
|---|---|---|---|
| Gateway | PUT | /api/report-communication/{id}/profile-access |
Copy |
Known Limitations
The following parameters are preset and cannot be changed since they are currently not requested from the API endpoints:
- idType (1 for "link" and 2 for "file generation"): always 2
- extensionType (1 for "email" and 2 for "file share"): always 2
- useTranslation (boolean): always false