FSM Service Report Definition and Layout Reference
This topic covers:
The following table lists the standard PDF templates and default report file names.
|
Record |
Standard PDF Template |
Report File Name |
|---|---|---|
|
Case |
|
|
|
CRM task |
|
|
|
Project task |
|
|
For the corresponding HTML email templates, see FSM Notification Email Definition Reference.
These template references are relative to the FSM script folder in the File Cabinet. For a custom template stored elsewhere, use its full File Cabinet path.
Each standard attachment has type: "pdf". Its contents object contains the XML template reference and the data supplied to that template.
The standard automatic notification rule arrays are empty. The presence of a service report definition doesn't itself enable automatic sending. Manual report actions and automatic notification rules are separate controls.
Report File Properties
The following properties apply to the generated report attachment, such as notification.taskEmail.servicereport.attachments.servicereport.
|
Property |
Accepted Value |
Standard Value or Fallback |
Effect |
|---|---|---|---|
|
|
|
|
Converts the rendered XML into a PDF. |
|
|
File name string. |
Omitted in the standard definitions. The rendered template's |
Sets an explicit file name. Include the intended extension. |
|
|
Object containing |
Record-specific standard definition. |
Supplies the template and its data. |
|
|
File Cabinet path string. |
Record-specific XML template listed in FSM Service Report Definition and Layout Reference. |
Selects the file used to render the PDF. |
|
Additional properties within |
Named record definitions, searches, or JSON data appropriate to the template. |
Varies by report. |
Supplies data under those names for the template to use. |
Use contents for the report attachment and body for the email message.
Keep the service report PDF as the first attachment returned by the notification definition. The record's PDF preview returns that first rendered attachment. Adding an attachment before it can change what the Service Report action opens.
The standard attachments object includes array: true, which combines its named entries into the attachment list. Preserve this control when extending the existing object. If replacing it with an array, include every attachment that should remain available and preserve the PDF's position.
Layout Properties for Task Reports
The standard CRM task and project task XML templates use the following values within their PDF attachment's contents object.
|
Property |
Standard Value |
Purpose |
|---|---|---|
|
|
|
Expected logo height in pixels, used in the template's scaling calculation. |
|
|
|
Header height in pixels. |
|
|
|
Page width in pixels. |
|
|
|
Page height in pixels. |
|
|
|
Page margin in pixels. |
|
|
|
Spacing used between image columns, in pixels. |
|
|
|
Number of image-grid columns. |
|
|
|
Assumed image size in pixels, used to calculate display resolution. |
|
|
|
Footer height in pixels. |
These values are inputs to the standard task report templates. Changes to these properties affect a custom template only if the template uses the properties. Use positive dimensions, a positive whole-number column count, and sufficient page space for margins and columns.
The following configuration fragment changes the CRM task image grid to two columns:
{
"notification": {
"taskEmail": {
"servicereport": {
"attachments": {
"servicereport": {
"contents": {
"body": {
"columns": 2
}
}
}
}
}
}
}
}
The other inherited layout properties remain.
The standard case template defines its layout directly in XML, including A4 page size and header and footer dimensions. It doesn't use this task-report layout property set. Adding these JSON properties to a case report doesn't by itself change the supplied case layout.
Standard default JSON for the CRM task report template and layout properties (record and search data remain inherited):
{
"notification": {
"taskEmail": {
"servicereport": {
"attachments": {
"servicereport": {
"type": "pdf",
"contents": {
"template": "templates/taskreport.xml",
"logo": {
"height": 75
},
"header": {
"height": 125
},
"body": {
"width": 750,
"height": 1060,
"margin": 25,
"gutter": 25,
"columns": 3,
"imagesize": 1080
},
"footer": {
"height": 60
}
}
}
}
}
}
}
}
Images and Branding
The standard task reports include an image data source. Layout properties control how selected images are arranged without changing the original files or the records that own those files.
body.imagesize doesn't resize uploaded images. It supplies an assumed size for the XML template's display calculation.
The standard case report doesn't define an equivalent image-gallery data source. Adding a gallery requires both suitable data selection and matching XML template content.
The report data can include a subsidiary record for branding when subsidiaries are enabled. The XML template determines which logo, address, and contact fields appear.
Preserve the configured mappings for image addresses when extending standard searches. A file that displays in FSM Mobile doesn't establish that the PDF renderer can retrieve it.
Language and Translations
Service reports use the service notification's selected language. For customer, subsidiary, and account fallbacks, see Language and Translations. To set the language fields or custom collection references, see Configuring FSM Localization and Translation.
The report and email templates are rendered using that language. FSM translation identifiers in the templates can provide translated labels. Hard-coded text added to a custom template doesn't automatically acquire translations.
The selected template must support the required characters, fonts, date and number presentation, and custom text.