Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Configuring the response for Service Email rules

Updated on November 23, 2022

Use the Response tab to specify how the service rule constructs the response that Pega Platform sends when the service processing is complete. You can set up more than one response, based on conditions.

  1. On the Response tab, in the Condition field, select a condition:
    • To send this response when there are no errors to report, select Default.

      If you plan to set up more than one condition, configure the Default condition as the last one in the list.

    • To configure the system to evaluate the when condition that is specified by the When Key field, select When.

      If the condition is true, the system returns the response message data. If the condition is false, the system evaluates the next when condition rule in the list. If all when condition rules are false, the system returns the default response data. Use this feature to extend the normal set of fatal error conditions that result in exceptions returned to the client, such as inappropriate inputs to the service activity or other tests that you define.

    • To configure the service to return the specified response message data if an error occurs while mapping incoming data from a request message to the clipboard, select Mapping Error.

      If the list of response conditions does not include an entry for mapping errors, Pega Platform returns a standard error message.

    • To configure Pega Platform to return the specified response message data if an error occurs during authentication of the user credentials, select Security Error.

      If the list of response conditions does not include an entry for security errors, the Pega Platform returns a standard error message.

    • To configure the system to send the specified response message data if a service error occurs, select Service Error.

      If the list of response conditions does not include an entry for service errors, Pega Platform returns a standard error message to the sender of the email.

    The system evaluates these conditions in the order that you define. Only the first matched condition is evaluated.
  2. In the Message type field, set the content type of the response:
    • To send the response in the text/plain MIME format, select Text Message.
    • To send the response in HTML, select HTML.
    • To send no response when the condition that is defined in this row applies, select None.

      If you choose None, the response body defaults to text only, regardless of what the body contains.

  3. If the condition value for the row is When, in the When name field, enter the name of a when condition to evaluate.
    The system uses the first key part (primary page class) of this service email rule as the applies to key part of the when condition rule.
  4. Expand the Message contents section.
  5. In the Message header section, specify the data for the response message headers:
    1. In the Field name field, select From or Subject.
    2. In the Description field, enter a short description of the header field.
    3. In the Map from field, specify the source or the type of source of the value in Pega Platform.
      • Clipboard – A property or a page on the clipboard.
      • Constant – A fixed value that does not change.
      • XML Stream – A stream of XML data that is provided by an XML Stream rule.
      • HTML Stream – A stream of HTML data that is provided by an HTML rule.
      • HTML Frame – A stream of HTML data generated by the service activity.
      • Correspondence – A template for outgoing correspondence that is defined in a correspondence rule.
    4. In the Map from key field, specify the key for locating the property or rule in the source that is specified in the Map from field:
      • If the Map from value is Clipboard, enter the reference to the property. You can use standard properties. See More about Service Email Rules.
      • If the Map from value is Constant, enter a literal text string. To include blank spaces in your text string, surround the string with double quotes.
      • If the Map from value is XML Stream, enter either the stream name (second key part) of the appropriate XML rule or a page name and stream name using the syntax PageName.StreamName.

        The page must be on the clipboard when the service rule runs for rule resolution to find the rule. If you specify the stream name only, the system uses the page class of this service rule (found on the Service tab) as the first key part of the HTML rule.

      • If the Map from value is HTML Stream, enter either the stream name (second key part) of the appropriate HTML rule or a page name and stream name using the syntax PageName.StreamName.

        The page must be on the clipboard when the service rule runs for rule resolution to find the rule. If you specify the stream name only, the system uses the page class of this service rule (on the Service tab) as the first key part of the HTML rule. You can use the standard HTML rule EmailHeader for the subject. See More about Service Email Rules.

      • If the Map from value is HTML Frame, enter the name of the frame that is specified in the Show-HTML step of the service activity.

        Use this option to return data from activities that were originally written for interactive browser clients and use the Show-HTML method.

      • If the Map from value is Correspondence, enter the name of the appropriate correspondence rule.
  6. In the Message data section, define the message body for the response message:
    1. In the Description field, enter a short description of the message body.
    2. In the Map from field, specify the source or the type of source of the value in Pega Platform:
      If additional choices appear, they identify a custom function rule in a MapFrom library. Review the function rule to determine what the function does.
      • Clipboard – A property or a page on the clipboard.
      • Constant – A fixed value that does not change.
      • XML Stream – A stream of XML data that is provided by an XML Stream rule.
      • HTML Stream – A stream of HTML data that is provided by an HTML rule.
      • HTML Frame – A stream of HTML data that is generated by the service activity.
      • Correspondence – A template for outgoing correspondence that is defined in a correspondence rule.
    3. In the Map from key field, specify the key for locating the property or rule in the source specified in the Map from field:
      • If the Map from value is Clipboard, enter the reference to the property.
      • If the Map from value is Constant, enter a literal text string.

        To include blank spaces in your text string, surround the string with double quotes.

      • If the Map from value is XML Stream, enter either the stream name (second key part) of the appropriate XML rule or a page name and stream name using the syntax PageName.StreamName.

        The page must be on the clipboard when the service rule runs for rule resolution to find the rule. If you specify the stream name only, the system uses the page class of this service rule (found on the Service tab) as the first key part of the HTML rule.

      • If the Map from value is HTML Stream, enter either the stream name (second key part) of the appropriate HTML rule or a page name and stream name using the syntax PageName.StreamName.

        The page must be on the clipboard when the service rule runs for rule resolution to find the rule. If you specify the stream name only, the system uses the page class of this service rule (on the Service tab) as the first key part of the HTML rule. You can use or adapt the standard HTML rule EmailResponse for the message body. See More about Service Email Rules.

      • If the Map from value is HTML Frame, enter the name of the frame that is specified in the Show-HTML step of the service activity.

        Use this option to return data from activities that were originally written for interactive browser clients and use the Show-HTML method.

      • If the Map from value is Correspondence, enter the name of the appropriate correspondence rule.
      • If the Map from value is a Rule-Utility-Function from a MapFrom library, either select the property that holds the value to be processed by the function at run time or leave this field blank, as appropriate for the function.
  7. Click Save.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us