HTML links – sending emails and adding events to the calendar

MicroStrategy offers more than just building visualizations – it provides a wide range of functions that can address users complex needs. This is possible by integrating other widely-known services directly within MicroStrategy. In this article we explain how by using HTML code and hyperlinks you can send emails from dashboard level, that include dynamic text or links to online meetings. This functionality can be used when creating applications or in user notification processes.

Mail Link:
  1. Right-click on the object you want to use as an email link (e.g., an Image or Button) and select Properties and Formatting…
  1. For a Text Field or Image, go to the General tab,

    in the Navigation section, check the Is hyperlink option.

    For a Button element, go to the Button tab,
    under Actions, open the configuration window
    check Navigate to this URL.
  1. In the Hyperlink field enter the following example HTML code (%20 represents a space), then confirm the changes.
    mailto:JaneDoe@email.com?subject=Event%20Notification%20&body=Invitation%20
  2. Open the document in presentation mode and click the newly created link, which will open a prepared message in your default email application.
  1. The link shown above uses hardcoded information, which is rarely useful. MicroStrategy allows for further personalization of links by inserting attributes or metrics. The previous link can be modified like this:

    mailto:[ ]?subject=[ ]&body=[ ]

    where you replace the brackets with attributes or metrics, for example:

    mailto:{Email}?subject={Event@Title}&body=You%20are%20invited%20to%20{Event@Title}%20on%20{Event@EventDate}.%20 From%20{Event@StartTime}%20to%20{Event@EndTime}In this example, we used the attributes Email and Event (and its various forms), so the message automatically adjusts to different users and events.
Calendar Link:
  1. The first two steps (choosing an element and options) are identical to creating mail links.
  1. A Hyperlink to add events to a calendar can take two forms: a link that directs to a specific service (e.g., Outlook or Google Calendar) or a link that accesses a calendar API, which generates a universal ICS file.
  1. Here is an example link (%3A represents ":"):

    To add an event to Outlook Calendar:
    https://outlook.live.com/calendar/0/deeplink/compose?allday=false&body=Text
    &startdt=2023-08-01T10%3A00%3A00&location=Office
    &path=%2Fcalendar%2Faction%2Fcompose&rru=addevent
    &enddt=2023-08-01T11%3A00%3A00&subject=Title

    To add an event to Google Calendar:
    https://calendar.google.com/calendar/r/eventedit?text=Text
    &dates=20230801T100000/20230801T110000&details=Text

  1. In these links, you can replace all data with attributes or metrics to create dynamically changing links. However, pay attention to the date and time formats, which vary depending on the calendar service you choose.

  2. If you want to add events to all available calendars, you can generate an ICS file that the user can download and import into their calendar. In this case, you can connect to one of the many available calendar APIs. Some APIs provide a link-based connection (e.g., https://calndr.link/api-docs), allowing you to add a hyperlink to the API in your document, which will generate an ICS file. As before, all data can be replaced with attributes or metrics.
  3.  
  4. https://calndr.link/d/event/?service=SERVICE&start=START&end=END
    &title=TITLE&timezone=TIMEZONE

Dodaj komentarz