Adding URL mappings to secure inline images for triage cases
Ensure that inline images displayed in email triage cases are more secure for Pega Email Bot™. By adding URL mappings to your application, sensitive data embedded in inline image attributes for a triage case is encrypted and displayed by the system as hash code. The URL Mappings rule defines simple URL patterns that you can use in your application's work items, for example, email triage cases and its inline images.
For example, after you add URL mappings and you then enable web developer tools for your browser, the attribute information for a triage case inline image HTML tags is encrypted and displayed by the system as hash code.- Switch to Dev Studio.
- In the navigation pane of Dev Studio, click Records.
- Expand the Technical category, and then click URL Mappings.
- In the list of URL mappings rule instances, open the top-most rule for your application: pyDefault.
- Define the getEmailImgByHash URL alias:
- In the Cases section, click Add URL alias.
- In the Define URL Mapping window, in the Identifier field, enter: GetEmailImgByHash
- Clear the Map path elements for URL generation checkbox.
- In the list in the Path element type column, select Constant, and then in the field in the Value column, enter: getEmailImgByHash
- Click Add path element, and then in list in the
second row in the Path element type column,
select Parameter.
Result: The field in the Value column in the second row displays {param1}. - Click Add path element, and then in list the
third row in the Path element type column, select
Parameter.
Result: The field in the Value column in the third row displays {param2}. - Click Next.
Result: The following figure shows the URL mapping settings for the getEmailImgByHash URL alias: The settings for the new getEmailImgByHash URL mapping - In the Define processing activity window, in the Class field, enter: Work-Channel-Triage
- In the Activity field, enter: pyGetImageForDisplay
- Click Add parameter, and then in the Parameter field, enter: pyId
- In the Value field, enter: {param2}
- Click Add parameter, and then in the Parameter field, enter: hash
- In the Value field, enter: {param1}
- Click Add parameter, and then in the
Parameter field, enter:
cidLeave the Value field for the cid parameter empty.
Result: The following figure shows the activity mapping for the getEmailImgByHash URL alias: The settings for the getEmailImgByHash activity mapping - Click Finish.
Result: The list in the Cases section displays the getEmailImgByHash URL mapping.
- Define the getEmailImagByCID URL alias:
- In the Cases section, click Add URL alias.
- In the Define URL Mapping window, in the Identifier field, enter: GetEmailImgByCID
- Clear the Map path elements for URL generation checkbox.
- In the list in the Path element type column, select Constant, and then in the field in the Value column, enter: getEmailImgByCID
- Click Add path element, and then in list the
second row in the Path element type column,
select Parameter.
Result: The field in the Value column in the second row displays {param1}. - Click Add path element, and then in list the
third row in the Path element type column, select
Parameter.
Result: The field in the Value column in the third row displays {param2}. - Click Next.
Result: The following figure shows the URL mapping settings for the getEmailImgByCID URL alias: The settings for the new getEmailImgByCID URL mapping - In the Define processing activity window, in the Class field, enter: Work-Channel-Triage
- In the Activity field, enter:
pyGetImageForDisplay
Result: The system displays three rows in the Parameter column for the pyID, hash, and cid parameters. - In the row for the pyID parameter, in the
Value field, enter:
{param2}Leave the Value field for the hash parameter empty.
- In the row for the cid parameter, in the
Value field, enter:
{param1}
Result: The following figure shows the activity mapping for the getEmailImgByCID URL alias: The settings for the getEmailImgByCID activity mapping - Click Finish.
Result: The list in the Cases section displays the getEmailImgByCID URL mapping.
- Save your changes by performing one of the following actions:
- To save the rule that belongs to a locked ruleset to an isolated sandbox
in order to test your changes, click Private edit.
For more information, see Performing a private edit.
- To save the rule to a ruleset, click Save as.
- To save the rule that belongs to a locked ruleset to an isolated sandbox
in order to test your changes, click Private edit.
- Switch back to App Studio.

Previous topic Enabling inline images in email triage cases Next topic Creating outbound email templates