Create or update an email definition - SmartPlant Foundation - IM Update 46 - Help - Hexagon

SmartPlant Foundation Help

Language
English
Product
SmartPlant Foundation
Search by Category
Help
SmartPlant Foundation / SDx Version
10
SmartPlant Markup Plus Version
10.0 (2019)
Smart Review Version
2020 (15.0)
  1. Click File > New > Administration > Email Definition in the Desktop Client.

    SHARED Tip You can also select the email definition in the Desktop Client, and click Update on the shortcut menu.

  2. In the Main details section, type a name and description for the email definition.

  3. In the E-mail interface definition details section, type a brief description of the email in the E-mail Subject text box. This appears in the subject line of the email.

  4. In the E-mail body text box, type the purpose of the email. This should include anything that needs to be clearly explained to the user.

    • The body of the email can be configured to include previous step information by using a condition in the E-mail body text box of an email definition. The comments are entered in the comments area in the SignOffStepTask dialog box on completion of that step. For more information, see Add comments and messages to next step email.

    • If a condition syntax in the E-mail body text box results in multiple objects, then the body of the email may be configured to display the object information on a separate line. When the condition returns multiple properties of the related objects, the objects will be listed on separate lines. However, if the condition returns only one property for each related object, then the results will appear on one line with commas separating each object.

    • If a property definition is scoped by an Enum, the body of the email returns the Enum's name. However, you can configure the email syntax to return the display name in an email message by adding a suffix of a tilde (~) to a property definition. This indicates that the Display Name property will be used. If there is no value for the Display Name property, the email will return the value in the Name property instead. For example, &Obj->SPFWorkflowWorkflowStep_21->SPFItemWorklow_21.SPFXmtlIssueState~& is ready to be actioned.

  5. Type the reply address in the Reply Address box. The reply address can be:

    • the owner of the change

    • the submitter of the change

    • a specified user

  6. If you want to specify a target path to open the To Do List, you assign the ShowInboxForObject method in a URL. The URL hyperlink appears in the body text of the resulting email and is specific to each email recipient. When the user clicks the hyperlink, their To Do List window opens and shows the specific workflow steps ready for action for the object in the email notification.

    The example below shows how to configure the path in the URL 1 box sample above, which provides a link in the email message to view the item in the Desktop Client if you are using SPFOpen:

    To view the item in SPF please click this link: 

 SPFOpen:CONFIGUID=&Obj->SPFWorkflowWorkflowStep_21->SPFItemWorkflow_21.Config&^API=QFindObject^ARG1=ISPFWorkflowItem^CRITERIA=&Obj->SPFWorkflowWorkflowStep_21->SPFItemWorkflow_21.Name&

    The example below shows how to configure the path in the URL 2 box sample above, which provides a link in the email message to view the To Do List in the Desktop Client if you are using SPFOpen:

    


To view your inbox in SPF please click this link:

 SPFOpen:CONFIGUID=&Obj->SPFWorkflowWorkflowStep_21->SPFItemWorkflow_21.Config&^API=ShowInbox

    The example below shows how to configure the path in the URL 3 box sample above, which provides a link in the email message to view only the workflow steps ready for action for the item in your inbox or To Do List in the Desktop Client if you are using SPFOpen:

    


To view steps for this item in the inbox please click this link: 

 SPFOpen:CONFIGUID=&Obj->SPFWorkflowWorkflowStep_21->SPFItemWorkflow_21.Config&^API=ShowInboxForObject^ARG2=&Obj->SPFWorkflowWorkflowStep_21->SPFItemWorkflow_21.OBID&

  7. Click Finish to create the email definition.

    • To include special characters, such as symbols or carriage returns, you can include the ASCII code in the text with the "&#" as leading characters and ";" as the final character. In the examples above the "
" inserts a carriage return (ASCII character 13). To include an ampersand (&) in a path in an email, type "&" instead of "&".

    • Customers upgrading from SmartPlant Foundation 2009 SP3 see the data populated in the URL1 and URL 2 boxes from their current configuration. You can reconfigure the URL 3 box email definition to match the example as shown.

    • To get properly formatted hyperlinks in the email, the recipient's user preferences must include setting the Format type for e-mail digest property to HTML.

Configure email definitions for Web Client

You can configure an email definition to send notifications about workflow objects to Web Client users. The users can then access the related workflow object in their To Do List by clicking the URLs in the email notification.

To open hyperlinks in email notifications in the Web Client, you must specify the fully-qualified URL path to the Web Client site in the SDAClientURL property in Site Settings in Server Manager, see Site Settings node properties.

The following example shows how to define an email definition for Web Client.

  <SPFEmailDef>
    <IObject UID="EM_CompletionEmail" Name="CompletionEmail" ContainerID="Core.Workflow_Admin" />
    <ISPFEmailDef SPFReplyAddress="" SPFEmailURL2="" SPFSubjectText="The workflow for object &amp;Obj-&gt;SPFItemWorkflow_21.Name&amp; has finished in SPF." SPFEmailURL5="" SPFEmailURL3="" SPFBodyText="The workflow for object &lt; &amp;Obj-&gt;SPFItemWorkflow_21.Name&amp; &gt; has finished.&#xA;&#xA;&#xA;&#xA;  To view the item in SPF please click this &lt;a href=&amp;ENV.SDAClientURL&amp;/#/objects;queryFilter=%7B%22filters%22%3A%5B%5D%2C%22pageSize%22%3A25%2C%22page%22%3A1%2C%22relatedItemFilters%22%3A%5B%5D%2C%22expandFromObjectId%22%3A%22&amp;Obj-&gt;SPFItemWorkflow_21.OBID&amp;%22%2C%22hasLink%22%3Atrue%7D;config=%5B%22&amp;Obj-&gt;SPFItemWorkflow_21.Config&amp;%22%5D/detail/&amp;Obj-&gt;SPFItemWorkflow_21.OBID&amp;&gt;link&lt;/a&gt;&#xA;&#xA;" SPFEmailURL1="" SPFEmailURL4="" />
    <ISPFAdminItem />
    <ISPFSubscribableItem />
  </SPFEmailDef>

You use the environment variable ENV.SDAClientURL to access the fully-qualified URL path to the Web Client site set in the SDAClientURL property.

Configure email definitions for Intergraph Smart Cloud users

You can configure an email definition to send notifications about workflows to Intergraph Smart Cloud users. The users can then access the workflow object and their To Do List in the Desktop Client by clicking the URLs in the email notification.

Before you configure the email definition, you must update the SPFAppServer.config file located at [drive]:\ Server Files\Web_Sites\<SPFsite>\SPFConfigService\SPFSharedSettings with the following entries to generate URLs for the Intergraph Smart Cloud Web APIs:

  • <add key="CloudAuthenticationURL" value="" />

  • <add key="CloudAppName" value="" />

  • <add key="CloudSubAppName" value="" />

  1. In the Desktop Client, click Find > Administration > E-mail Definition.

  2. Select an email definition, and right-click Update.

  3. In the E-mail body text box, type a custom message to notify the user about the workflow step status.

    You can also specify a URL that will invoke an action in the Desktop Client from Intergraph Smart Cloud. For example:

  • To login to the Desktop Client

    {ENV.CLOUDURL}

  • To view the steps in the inbox with respect to a specific item

    {ENV.CLOUDURL /CONFIGUID &Obj->SPFWorkflowWorkflowStep_21->SPFItemWorkflow_21.Config& /API ShowInboxForObject /ARG2 &Obj->SPFWorkflowWorkflowStep_21->SPFItemWorkflow_21.OBID&}

  • To open the To Do List window that displays workflow steps ready for action in inbox

    {ENV.CLOUDURL /CONFIGUID &Obj->SPFWorkflowWorkflowStep_21->SPFItemWorkflow_21.Config& /API ShowInbox}

  • To view the item in the Desktop Client

    {ENV.CLOUDURL /CONFIGUID &Obj->SPFWorkflowWorkflowStep_21->SPFItemWorkflow_21.Config& /API QFindObject /ARG1 ISPFWorkflowItem /CRITERIA &Obj->SPFWorkflowWorkflowStep_21->SPFItemWorkflow_21.Name&}