Email Adapter

An Email Integration Service empowers a user to send emails (like notification, status mails) from the client app. You can also know the status of the email which was sent before through Email service. The email requests are sent to the Quantum Fabric server which in-turn redirects them to the Quantum Engagement server.

While configuring an Email service, you can pass the email ID, subject , message and even attachments as input parameters based on which the email will be delivered to the respective recipients. However, the client app user can configure the body of the email from the client app or any design time environment.

Perform the following steps to configure an Email Service:

  • Configure a Service Definition for Email Service.
  • Configure Operations for the Service definition.

NOTE: This is a static adapter and the default configurations that appear while configuring the operations are sufficient to get the required output from the service. You can leave the remaining fields as is.

Configure a Service Definition

To configure the Email Adapter in the Integration service definitiontab, follow these steps:

  1. In the Name field, provide a unique name for your service.
  2. From the Service Type list, select Email.
  3. In the Authentication section, the Use Existing Identity Provider list displays the existing Identity services available in the Fabric App. Select an Identity Service from the list. This will add a security layer onto your Email service. If you select an Identity Service, you must provide appropriate login details to send an email from the client app.
  4. NOTE: All options in the Advanced section are optional.

  5. In the Description field, provide a suitable description for the service.
  6. Click Save or Save and Add Operation to save your service definition.

Configure Operations for the Service definition

  1. Click Save and Add Operation in your service definition page to save your service definition and display the New Operation tab for adding operations.
    OR
    Click Add Operation to add a new operation or from the tree in the left pane, click Add > Add New Operation.
  2. In Operations List tab, select the required operation and click Add Operation. A new operation is created and listed in the Operations List tab with Email_Operations as default prefix. The operations available are:
    • sendEmail - You can use this operation to configure an email template which will be used by the client app to send emails.
    • getEmailStatus - You can use this operation to know the status of the emails that were sent.
  3. Select the new operation that was added to configure the operation. Refer to the following sections to know more about the configurations you can do for each operation.

Configure Operations

In the sendEmail operation you can configure the details like Message, Attachments, and more. The details defined here act as the template for the email.

Perform following steps to configure a sendEmail or getEmailStatus operation:

  • Click the required operation from the operations list. The operation details page appears.
  • Provide the following information in the details page:
    FieldDescription
    NameThe operation name appears in the Name field. You can modify the name, if required.
    Operation Security Level

    It specifies how a client must authenticate to invoke this operation.

    NOTE: The field is set to Authenticated App User, by default.

    Mapped ToDisplays the operation with which the adapter is linked with in the back end. This field is non editable.
    ActionDisplays the type of connector (service or object) with which this operation is linked with. This field is non editable.
  • NOTE: All options in the Advanced section for operations are not mandatory.

  • Enter the Description for the operation.

Request Input Parameters

In the Request Input tab, you can configure the parameters like To, CC, Message, Attachments and more which are required to send an email. The details defined here act as the template for the email. You can define the value of each parameter here directly, or provide the information of the source from where the information can be retrieved.

You can define the Body and Header related input parameters from the Request Input tab. By default, the Body tab is selected. You can do the following to configure the input parameters in the Body tab:

Field Description
Name The name for the request input parameter.
Value

The options available in the Value list determine the source from where the value of the input parameter must be retrieved.

NOTE: The field is set to Request, by default.

NOTE: For more information on Externalizing Identity Services, refer to Replace the Identity Service references in a Fabric app.

Test Value A test value is used for testing the service.
Default Value The default value is used in the run-time when the service cannot find the defined header parameter value.
Data Type
Collection ID Determines the location of the input value if there is a list of collections in the input received.
Record ID Determines the location of the input value if there is an array of records in the input received.
Description Enter the description for the request.

 

The following input parameters are displayed by default for Email_Operations_sendEmail operation:

  • To
  • CC
  • message
  • subject
  • attachments

The following input parameters are displayed by default for Email_Operations_getEmailStatus operation:

  • requestID

Click the Header tab to configure the header parameters. The parameters configured here will be appended to the header of the input request. Configure the following fields to define header parameters:

Field Description
Name The name for the request input parameter.
Value

The options available in the Value list determine the source from where the value of the input parameter must be retrieved.

NOTE: The field is set to Request, by default.

Test Value A test value is used for testing the service.
Default Value The default value is used in the run-time when the service cannot find the defined header parameter value.
Description Enter the description for the request.

 

Response Output Parameters

In the Response Output tab, you can configure the output parameters that you are expecting the service to return after the service is executed.

By default, the following output parameters are returned from the back end for Email_Operations_sendEmail operation:

  • Email Result
  • requestId
  • message

By default, the following output parameters are returned from the back end for Email_Operations_getEmailStatus operation:

  • Email Status
  • Email Count
  • Message Response

You can configure the following information about each output parameter:

Field Description
Name The name for the response output parameter.
Path Determines the path where you want to store the output value from the response.
Scope

It determines the how you want to use the output value. It has the following options:

  • Response - Select this option if you want to add the output in the response sent to the client app user.
  • Session - Select this option if you want to add the output in the session information. This information will not be sent to the client app user.
Data Type
Collection ID Determines the location of the output value if there is a list of collections in the output received.
Record ID Determines the location of the output value if there is an array of records in the output received.
Description Enter the description for the request.

Other common options available in the Request Input and Response Output tabs are as follows:

  • Add Parameter: Click Add Parameter  to add an entry (if the entries for input and the output tabs does not exist).
  • Copy, Paste: Select the check box of an entry, and click Copy and Paste, if you want to make duplicate entries.
  • Delete: Select the check box of an entry and click Delete, if you want to delete an entry.
  • Enable pass-through: Select the Enable pass-through check box if you want to forward the body of the client's request to backend as it is. For more details on API Proxy service, refer to How to Enable Pass-through Proxy for Operations.