CorrespondenceSent

Smile emits this message after a notification is sent to a customer about a spend limit, credit limit, usage alert group or value pool. The notification is triggered when a subscription crosses an alert threshold, or a new rating period begins and the spend management tools are reset to 0.

This message does not confirm that the customer received the correspondence. If the notification is not successfully sent, Smile does not emit any SmileTicket message.

Message header

The following table lists the parameters in the CorrespondenceSent message header.

Table 1. CorrespondenceSent header parameters
Parameter Type Values
company integer The company ID this account belongs to
accountUsn string The USN of the account that triggered the notification
subscriptionUsn string The USN of the subscription that triggered the notification
notificationType uuid The identifier of the notification type
channel string "SMS", "Email"
smileMessageType string "CorrespondenceSent"

Message body

The message body contains the <TransmittedCorrespondence> element and has the following format:
{http://xml.inomial.com/smile/2.xsd}TransmittedCorrespondence

Example: The <TransmittedCorrespondence> element for an SMS notification

This example shows a TransmittedCorrespondence XML document for an SMS notification.

<TransmittedCorrespondence xmlns="http://xml.inomial.com/smile/2.xsd">
  <company>1</company>
  <accountUsn>2142422670</accountUsn>
  <subscriptionUsn>2142425376</subscriptionUsn>
  <notificationType>
    <notificationTypeId>a32b46cf-b6af-50e8-bbff-c69b80c722df</notificationTypeId>
    <name>Included Calls</name>
  </notificationType>
  <channel>SMS</channel>
  <transmissionTime>2012-10-19T15:55:05.847+11:00</transmissionTime>
  <receiptId>&lt;33299522.6.1350622505767.JavaMail.joe@example.lan&gt;</receiptId>
  <operatorUsn>2142420716</operatorUsn>
  <SMS>
    <RecipientList>
      <address>joe@example.com</address>
    </RecipientList>
    <from>admin@example.com</from>
    <bodyText>You've used 100% of your $10.00 Included Calls allowance
      0491570156</bodyText>
  </SMS>
</TransmittedCorrespondence

Example: The <TransmittedCorrespondence> element for an email notification

This example shows a TransmittedCorrespondence XML document for an email notification.

<TransmittedCorrespondence xmlns="http://xml.inomial.com/smile/2.xsd">
  <company>1</company>
  <accountUsn>2142422670</accountUsn>
  <subscriptionUsn>2142425376</subscriptionUsn>
  <notificationType>
    <notificationTypeId>a32b46cf-b6af-50e8-bbff-c69b80c722df</notificationTypeId>
    <name>Included Calls</name>
  </notificationType>
  <channel>Email</channel>
  <transmissionTime>2012-10-19T16:15:52.647+11:00</transmissionTime>
  <receiptId>&lt;22230889.13.1350623750015.JavaMail.joe@example.lan&gt;</receiptId>
  <operatorUsn>2142420716</operatorUsn>
  <Email>
    <RecipientList>
      <address>joe@example.com</address>
    </RecipientList>
    <CCList/>
    <BCCList/>
    <from>admin@example.com</from>
    <replyToList/>
    <subject>Value Pool consumption</subject>
    <bodyText>% Consumed 100
      Alert Threshold % 100
      Amount Consumed 10.00
      Company Name Example Telecom Ltd
      Contact Display Name Joe
      Contact Family Name
      Contact Given Name
      Contact Name
      Current Billing Period End 31/10/12
      Current Plan Code ABC-A2
      Current Plan Name A2 plan
      Current Time 16:15:49
      Formatted Amount Consumed $10.00
      Next Billing Period Start 1/11/12
      Raw Username 0415050111
      Sequence Number 10004
      Subscription Description
      Today's Date 19/10/12
      Today's Date and Time 16:15 19/10/2012
      User Service Name Road Warrior (0491570156)
      Value Pool Amount 10.00
      Value Pool Formatted Amount $10.00
      Value Pool Name Included Calls
      Reset Timestamp 22:00 31/10/2012
      Reset Timestamp (customer timezone) 00:00 01/11/2012
      Account Contact Display Name Joe
      Account Contact Family Name Smith
      Account Contact Given Name Joe
      Account Contact Name Smith
      Account Company Name 
      Subscription Company Name


      ---13635400---
    </bodyText>
    <bodyContentType>text/plain</bodyContentType>
    <Attachments/>
  </Email>
</TransmittedCorrespondence>