Step: Create E-mail Advanced
General
Object Id: 11154868 Function Id: 37
Purpose of step
The function will create and send an e-mail from 3PL.
Application Area
The step can be used in both TMS- as well as WMS-documents or in a status-template.
Functionality
A maximum of 5 reports can be generated and attached to the e-mail.
Name the report attachments
By default, a report attachment gets the caption of the report object as its file name, followed by the extension of the report format, for example .pdf. When you send several documents with the same report, the attachments then get the same name.
To give each attachment a recognizable name when the step runs on a purchase order or a posted purchase invoice, set up a report caption that contains the document number:
- Choose the
icon, enter Report Captions, and then choose the related link. - Choose New to create a line.
- In Report ID, select the report that you attach to the e-mail.
- In Language Code, select the language of the document.
- In Caption, enter the file name without the extension and use
%1where the document number must appear, for examplePurchase Invoice - %1.
When the step creates the attachment, it looks for a report caption that matches the report ID and the language code of the document. If it finds one, it uses the caption as the file name and replaces %1 with the document number. If it doesn't find one, it keeps the report object caption and doesn't add a document number.
Note
The document number is only added when the caption contains %1. A report caption without %1 gives every document the same file name.
Parameters
| Name | Description |
|---|---|
| EMAILTEMPLATE | The code of the E-mail Template to be used. |
| EMAILFIELD | The field based on which the e-mail should be sent to. |
| REPORTID | The report which should be generated and attached to the e-mail. |
| LAYOUTID | The lay-out code. |
| CUSTOM_LAYOUT | Custom Report layout. |
| SUFFIX | Append this lay-out after generated attachment. |
| PARTNERCODE | Partnercode. |
| MAILGROUPCODE | Mail Group code. |
| CONDITIONCODE | Condition. |
| REPORTLISTID | A value can be applied to filter on record-links. E.g. 30 for CMR. |
| 01. REPORTNO | Enter the Report No. of the first report to be generated and added to the e-mail. |
| 01. TABLENO | Enter the Table No. Supported tables are: 36, 112, 11154663, 11154660, 11172786, 11154851, 11191375, 11154856, 111548.. |
| 01. DOCUMENTTYPE | Related Document Type (0=Self; 1=Receipt; 2=Shipment; etc.) |
| 01. LAYOUTID | Layout Code. |
| 01. ORDERTYPE | OrderType Filter. |
| 01. APPEND LAYOUT | Append this lay-out after generated attachment. |
| 01. CUSTOM_LAYOUT | Append this lay-out after generated attachment. |
| 02. REPORTNO | Enter the Report No. of the second report to be generated and added to the e-mail. |
| 02. TABLENO | Enter the Table No. |
| 02. DOCUMENTTYPE | Related Document Type (0=Self; 1=Receipt; 2=Shipment; etc.). |
| 02. LAYOUTID | Layout Code. |
| 02. ORDERTYPE | Order Type Filter. |
| 02. APPEND LAYOUT | Append this lay-out after generated attachment. |
| 02. CUSTOM_LAYOUT | Append this lay-out after generated attachment. |
| 03. REPORTNO | Enter the Report No. of the third report to be generated and added to the e-mail. |
| 03. TABLENO | Enter the Table No. |
| 03. DOCUMENTTYPE | Related Document Type (0=Self; 1=Receipt; 2=Shipment; etc.). |
| 03. LAYOUTID | Layout Code. |
| 03. ORDERTYPE | Order Type Filter. |
| 03. APPEND LAYOUT | Append this lay-out after generated attachment. |
| 03. CUSTOM_LAYOUT | Append this lay-out after generated attachment. |
| 04. REPORTNO | Enter the Report No. of the fourth report to be generated and added to the e-mail. |
| 04. TABLENO | Enter the Table No. |
| 04. DOCUMENTTYPE | Related Document Type (0=Self; 1=Receipt; 2=Shipment; etc.). |
| 04. LAYOUTID | Layout Code. |
| 04. ORDERTYPE | Order Type Filter. |
| 04. APPEND LAYOUT | Append this lay-out after generated attachment. |
| 04. CUSTOM_LAYOUT | Append this lay-out after generated attachment. |
| 05. REPORTNO | Enter the Report No. of the fifth report to be generated and added to the e-mail. |
| 05. TABLENO | Enter the Table No. |
| 05. DOCUMENTTYPE | Related Document Type (0=Self; 1=Receipt; 2=Shipment; etc.). |
| 05. LAYOUTID | Layout Code. |
| 05. ORDERTYPE | Order Type Filter. |
| 05. APPEND LAYOUT | Append this lay-out after generated attachment. |
| 05. CUSTOM_LAYOUT | Append this lay-out after generated attachment. |
| SMTP_BACKGROUND | If empty a previewwindow will be openend in edit modus. If filled the mail will be send directly. |
| SMTP_FROM_CONTACTNO | Enter the From Contact (It requires an Email Account to be set up). |
| ATTACHMENT_SELECTION | Fill this if you want to show a file selection dialog (Record Link). |
| INCLUDE_ATTACHMENT | Include RecordLinks With Attached Document TRUE. |
| SAVE TO DOC. STORAGE | Save report PDF to document storage and add record link. |
| BCCMAIL | Enter a value if the BCC-email value from the Document Storage Setup is to be used. |
| ATTACHMENT_MERGE | Merge attachments: |
| CCCONTACTNO | Add Contact Mail in CC. |
| BCCCONTACTNO | Add Contact Mail in BCC. |
| ADDATTACHMTLINKDDOCS | Include RecordLinks from Linked Documents. |
| EMAILTO | Fixed To-Emailaddress iso EMAILFIELD. |
| ADDRECIPIENTS | Add default Recipients from Record. |
| VENDOR FILTER PARTY | Sets Limit Total Filter Vendor Filter based on a Document Party Vendor. |
| ADD USER TO BCC | Optional: Add contact e-mail of user to BCC recipients. |
| ATT LINKED DOC TYPE | Optional: Doc. Type Filter to Retrieve Record Links from Related Document(s). |
| ATT LINKED TABLENO | Optional: Table No Filter to Retrieve Record Links from Related Document(s). |
| USETIMESTAMP | Include Timestamp in Filename. |
| SKIP_SEND_EMPTY_BG | True: Skip send background mail if MailTo is empty. |
| REPORT FORMAT | Empty/1=PDF 2=CSV,3=XML,4=EXCEL,5=WORD,6=HTML. |
| ALL ADDRESS PARTIES | true: Add all address parties, false: Add party code address parties. |
Example
Send an e-mail to a vendor to outsourced a TMS-trip.
| Name | Description |
|---|---|
| EMAILTEMPLATE | SUBCONTRACTOR |
| EMAILFIELD | 1001 |
| REPORTID | 11172690 |
| SMTP_FROM_CONTACTNO | planning@..... |
| SAVE TO DOC. STORAGE | TRUE |
| ALL ADDRESS PARTIES | FALSE |