UI Builder - Compose Email Component Configuration

denmanty
Tera Expert

Hi,

 

Thought I would write something about my latest experience on using the Compose Email component in a custom configurable workspace.

 

This will also serve as something I can search one day if I forget how to configure the email composer component in UI builder.

 

First of all, you don't actually do anything in UI builder at all.

 

Additional information about my build.

- App was built using App Engine Studio (AES), nothing special here. Just followed the bouncing ball.

- Created a table for my app that extends "Task" (this is important)

- Create a workspace using AES.

 

Configuring sending email from a configurable workspace.

  • Ensure the table you want to send an email from has the attribute "email_client=true", this then will show the global UI Action called Compose Email in your record page in workspace.
    • To enable this attribute, open the dictionary of your apps table > open the Dictionary Entry that is a type Collection > Select Advanced View > enter "email_client=true" in the Attributes field.
  • We now need to create a page to open in workspace where we can draft an email and send it.
    • In the platform UI navigator search for sys_ux_screen.list
    • Select New
    • Enter a screen name, I called mine "Email Page Draft"
    • Screen Collection = Record
      • When searching for record there will be multiple, you will add the application column to the search results so you can grab the record from your application.
        denmanty_0-1720754832762.png

         

    • Screen condition = "table=sys_email_draft"
    • Page Definition = Compose email
      • You will notice there's a few email page definitions, this same methods works if you wanted have a page to preview an email.
    • Parent Macroponent = Workspace App Shell
    • Save

The UX Screen you just created should look like this

denmanty_0-1720756508169.png

 

You should now be able to open your workspace, navigate to your record page and in the top right corner there will the Compose Email UI Action and the Draft Email page will open when selecting it.

 

Compose email in top right corner of Workspace 

denmanty_2-1720755163339.png

 

Compose email page opened

denmanty_3-1720755291756.png

 

Cheers

Ty

 

 

1 REPLY 1

aayushshah998
Tera Contributor

hi denmanty,

For some context, I'm working with the email composer component on the UI builder which comes on the Draft email record page (table: sys_email_draft). We're working on a functionality where we present users with Now Assist AI responses on the right contextual sidebar in Cards. In those cards, there exists a button "Add to Email Reply" where using helpers.sn_http I make an API call to a custom scripted REST API which finds that draft email and pastes the content of the card onto the email body. 

Now on the front end, we don't see the updated draft email unless I reload the page (unlike how we can see updated forms when the values change on the backend).

I've tried the below: 
1) helpers.navigate.to but it would always return me to (/now/cwf/agent/)
2) built a UI action and in the client script of the UI action added top.window.location.reload() and then executed this as an event handler "Execute UI action" on button click. But this did not seem to work. 
3) Since the email compose component is not linked to a data resource (only requires a sys_id which we get from @context.props.sysId), I tried to link it to a data resource and then refreshed the data resource. That too didn't work. 

Any helpful recommendations from you would help tons!