Send email with new products
This Action Map sends an email with a list of new products.
NOTE: This particular Action Map requires Perfion 4.6.1 or later.
This example is provided as inspiration only. It must be adapted to your Perfion environment to work. Perfion Support does not assist with such adaptations. Please contact your Perfion Partner or your Perfion consultant if you need assistance.
Action Map
All lines containing a Command are created as virtuals. This is a recommended best practice
The "." in the first From field means "current Perfion database"
The SET command:
defines the SMTP gateway used to send the email
creates a $Header-variable for the email
creates an $ItemTemplate-variable to be used for each item in the email (template contains a link to the item in the Perfion Web Client)
SendEmail executes a script that creates the email in HTML-format and sends it to defined recipients
Sample data for building Action Map
Action Map - From | To | Command | Action | Script | Note |
. | Items | SELECT.PERFION |
| <Query> |
|
ID |
|
|
|
|
|
Value |
|
|
|
|
|
ItemName |
|
|
|
|
|
|
| SET |
|
|
|
host=DOMAIN;port=XXX;username=YYY;password=ZZZ | SMTP |
|
|
|
|
| $Header |
|
| <h1>New items in Perfion</h1><br> |
|
| $ItemTemplate |
|
| <a href='webclient.local/PerfionWebClient/#/editor/Product/String/{value}'>{ItemName}</a><br> |
|
SendEmail |
| EXECUTE.SCRIPT |
| string message = var["$Header"] + FillTemplate( "" + var["$ItemTemplate"], "Items", "<br>" ); SendEmail( "sender@domain.com", |
|