You are here: Configuring Channels > Configuring Email Channels > Defining an Email Script > Creating an Example Email Script

Creating an Example Email Script

An Virtual Contact Center email script uses the information contained in an email message to route the message to one or more email queues.

The following example contains a series of procedures that illustrate how to combine Virtual Contact Center Email Script objects and script object control flow features:

Before You Begin

The procedure in Inspecting Email Message Subject Lines for a String assumes that you have used the Configuration Manager to create at least one email queue.

For information about creating email queues, see Configuring Email Queues, on page 1.

Disabling the Email Channel Before Editing the Script

Best practice: Before editing an Virtual Contact Center Email Script, select the email channel's Own channel script and disable the email channel.

To select the email script and disable the email channel:

  1. Display the email channel's Properties tab.

    For information about the Channels Page, email channel Properties tab, see Configuring Email Channel Preferences, on page 1.

  2. In the Properties tab, in the Use script from channel list, choose Own channel script.
  3. Clear This channel is enabled.
  4. Click Save.

    The Virtual Contact Center applies the changes and display's the email channel's Email Script tab ().

Deleting Email Messages that Contain Viruses

If your email server does not provide protection against email viruses, include the Check Virus script object at the top of all your email scripts to help protect your contact center from malicious email messages.

If your server already protects against email viruses, do not use the Check Virus object.

To use the Check Virus script object to inspect a message for viruses:

  1. In the Email Script tab, in the script object selection list, select Check Virus.

    The Configuration Manager displays the parameters for the Check Virus email script object in the right-side script configuration area.

  2. In the configuration area, in the Label text entry area type CV01 then click Save.

    The Configuration Manager adds the Check Virus script object to the script. The Check Virus script object contains the infected and not infected labeled exit points.

  3. Delete any email messages infected by viruses. In the Check Virus script object, click the infected labeled condition, then in the in the script object selection list choose Delete Email.

    The Configuration Manager displays the parameters for the Delete Email email script object in the script configuration area.

  4. In the configuration area, in the Label text entry area, type DeleteInfected then click Save.

    The Configuration Manager inserts the Delete Email object below the infected label.

    Figure 94: Email Script, Check Virus script object

Use the same script design principles to incorporate the Check Spam and Check Flood objects into an email script.

Inspecting Email Message Subject Lines for a String

Use the Check Subject email script object to inspect the subject line of incoming email messages for a particular string.

To use the Check Subject script object to inspect an email message's subject line for a string:

  1. In the email script, in the Check Virus script object, click the not infected label, then in the script object selection list choose Check Subject.

    The Configuration Manager displays the parameters for the Check Subject email script object in the script configuration area.

  2. Configure the Check Subject object to inspect the subject area of email messages for the string ADV. In the script object configuration area:

    1. In the Label text entry area, type CS01.
    2. In the Select Operator list, choose Contains.
    3. In the Pattern text entry area, type ADV.
    4. Clear Use pattern as a POSIX extended regular expression and Negate comparison.
    5. Select Case Sensitive.
    6. Click Save.
  3. The Configuration Manager inserts the Check Subject script object below the not infected label.

    Figure 95: Email Script, Check Subject script object

Routing Email Messages to Queues

Use the comparison results returned by the Check Subject script object to route email messages.

To use the results Check Subject to route the message:

  1. Delete email messages that contain ADV in the subject area.

    1. In the Check Subject object, click the matched label. then in the object selection list choose Delete Email.

      The Configuration Manager displays the parameters for the Delete email script object in the script configuration area.

    2. In the Label text entry area, type DelADV, then click Save.

      The Configuration Manager inserts the Delete Email script object below the matched label. The email script will delete all incoming email messages that contain ADV in the subject line.

  2. For all messages that do not contain ADV in the subject area, route the message to an email queue.

    1. In the Check Subject object, click the not matched label. then in the object selection list choose Forward to queue.

      The Configuration Manager displays the parameters for the Forward to queue email script object in the script configuration area.

    2. In the Label text entry area, type EmailQ01.

    3. In the Select queue list, choose an email queue.

    4. In the Maximum number of emails waiting text entry area, type 100, then click Save.

      The Configuration Manager inserts the Forward to queue script object below the not matched label.

      Figure 96: Email Script, Forward to queue script object

  3. If the message does not exceed the value specified by Maximum number of emails waiting, then stop script processing. In the Forward to queue script object, click routed, then insert a Stop processing script object.

    After routing the message, the script stops.

  4. If the message exceeds the value specified by Maximum number of emails waiting (in the email queue), then send the email to an overload queue. In the Forward to queue script object, click overload, then insert a Forward to queue script object.

    Use the Forward to queue script object to specify a secondary email queue that receives messages that exceed the primary queue's Maximum number of emails waiting setting.

Inserting Stop Processing Objects into Email Scripts

The procedure in Routing Email Messages to Queues" illustrates the use of the Stop processing email script object to end the operation of an email script.

Insert Stop processing objects at all points where you intend the script to stop. Doing so ensures that the script always behaves as designed.

Enabling the Email Channel and Running the Script

Perform the procedure in this section to enable an email channel and run the channel's email script.

To enable the email channel:

  1. Display the email channel's Properties tab.

    For information about the Channels Page, email channel's Properties tab, see Configuring Email Channel Preferences, on page 1.

  2. In the Properties tab, in the Use script from channel list, choose Own channel script.
  3. Select This channel is enabled.
  4. Click Save.

    The Virtual Contact Center puts the email channel and associated script into service.

You can now send test messages to the email channel to validate the operation of the script.

 

See Also

 


Send us your Feedback