How to Set Up Processing for Inbound Messages with Text Content

Inbound Message Setup and Processing

  1. Create a sample message for use as the source format/template with the fields that would be extracted from the file specified. Fields to be used as arguments are wrapped in prefix "{$" and suffix "$}". There are different types of formats: free-form and fixed-position.
    1. Example of a free-form message, Device Position Update:

      MsgType:Device Position Update
      MsgDir:Forward
      Sender:{$SENDER_NAME$}
      Device:{$EXTERNAL_DEVICE_ID$}
      DateSent:{$DATE_SENT$} {$TIME_SENT$}
      DateHub:20090512 1205
      DateSNI:20090512 120545
      PosEventDate:{$EVENT_DATE$} {$EVENT_TIME$}
      PosDate:20090512 1230
      PosLatitude:{$LATITUDE$}
      PosLongitude:{$LONGITUDE$}
      PosLocation:{$LOCATION_GID$}
      PosNearest City:Green Bay
      PosNearest State:WI
      PosDistance from Nearest City-ST:3 miles
      PosDirection from Nearest City-ST:NNW
      PosIgnition Indicator:ON
      PosDirection Travelling:West
      PosSpeed:56 MPH
      EOBRRemainingtoWork:6:36
      EOBRRemainingonDrive:6:36
      EOM
    2. Example of a fixed-position message:

      MsgType:Fixed
      MsgDir:Forward
      {$SENDER_NAME$} 0 8
      {$EXTERNAL_DEVICE_ID$} 9 15
      DateHub:20090512 1205
      DateSNI:20090512 120545
      {$DATE_SENT$} 16 24
      {$TIME_SENT$} 25 29
      {$EVENT_DATE$} 30 38
      {$EVENT_TIME$} 39 43
      PosDate:20090512 1230
      {$LATITUDE$} 44 48
      {$LONGITUDE$}49 52
      {$LOCATION_GID$}53 60
      PosNearest City:Green Bay
      PosNearest State:WI
      PosDistance from Nearest City-ST:3 miles
      PosDirection from Nearest City-ST:NNW
      PosIgnition Indicator:ON
      PosDirection Travelling:West
      PosSpeed:56 MPH
      EOBRRemainingtoWork:6:36
      EOBRRemainingonDrive:6:36
      EOM

    Note: The first line “MsgType:Fixed” is mandatory to determine the type of Freeform message. The following lines indicate the fields wrapped in the “{$” and “$}“ and their respective start and end positions on the message line separated by whitespace characters.

    E.g. {$SENDER_NAME$} 0 8
    Indicates the field SenderName will appear at position 0-7 on the message line.

  2. If the message will be used to generate a transmission XML, create a sample transmission XML:
    1. Using a text editor, create a sample Transmission XML for use as the output of the message. Specify in the XML where the fields/arguments extracted from the source message should be placed.
    2. For the Device Position Update, a sample Transmission XML should be created. In this example, you must replace your user name and password:

<Transmission xmlns="http://xmlns.oracle.com/apps/otm">

<TransmissionHeader>

<AckSpec>

<ComMethodGid>

<Gid>

<Xid>EMAIL</Xid>

</Gid>

</ComMethodGid>

<EmailAddress>myemailaddress@oracle.com</EmailAddress>

<AckOption>YES</AckOption>

</AckSpec>

</TransmissionHeader>

<TransmissionBody>

<GLogXMLElement>

<ShipmentStatus>

<IntSavedQuery>

<IntSavedQueryGid>

<Gid>

<DomainName>GUEST</DomainName>

<Xid>MATCH_SHIPMENT_BY_DEVICE_ID</Xid>

</Gid>

</IntSavedQueryGid>

<IntSavedQueryArg>

<ArgName>DEVICE_ID</ArgName>

<ArgName>{$EXTERNAL_DEVICE_ID$}</ArgName>

</IntSavedQueryArg>

</IntSavedQuery>

<StatusLevel>SHIPMENT</StatusLevel>

<StatusCodeGid>

<Gid>

<Xid>X7</Xid>

</Gid>

</StatusCodeGid>

<EventDt>

<GLogDate>{$EVENT_DATE$}{$EVENT_TIME$}</GLogDate>

</EventDt>

<StatusReasonCodeGid>

<Gid>

<Xid>NS</Xid>

</Gid>

</StatusReasonCodeGid>

<SSStop>

<SSLocation>

<LocationID>{$LOCATION_GID$}</LocationID>

<LocationRefnumQualifierGid>

<Gid>

<Xid>GLOG</Xid>

</Gid>

</LocationRefnumQualifierGid>

<Latitude>{$LATITUDE$}</Latitude>

<Longitude>{$LONGITUDE$}</Longitude>

</SSLocation>

</SSStop>

<DriverRefnum>

<DriverRefnumQualGid>

<Gid>

<DomainName>GUEST</DomainName>

<Xid>DRIVER NAME</Xid>

</Gid>

</DriverRefnumQualGid>

<DriverRefnumValue>{$SENDER_NAME$}</DriverRefnumValue>

</DriverRefnum>

</ShipmentStatus>

</GLogXMLElement>

</TransmissionBody>

</Transmission>

  1. Define a Stylesheet Profile for each sample message:
    1. Specify the Stylesheet Profile ID.
    2. Specify the Template Name with the same value as the Stylesheet Profile ID.
    3. Specify the Direction of "INBOUND".
    4. Specify the Type of "TEXT".
    5. Select the For Message XML check box.
    6. Create a Stylesheet Content ID using the sample message created above.
      1. Upload the sample message.
    7. Set stylesheet profile arguments:
      1. Click the Parse Stylesheet Content button to parse the content for the arguments.
      2. Add any additional Arguments needed for processing with default values.
      3. Specify any that are Required to proceed with processing.
    8. Set the Stylesheet Profile Set Fields:
      1. Select the Field Name to update.
      2. Select the Argument Name.
      3. Select the Assign Type as "ARG".
        OR

        Enter a Message Code Map ID. It represents the lookup table.
  2. Define a Stylesheet Profile for each Transmission XML Template. If necessary, refer to step 2 above regarding creating a sample transmission XML.
    1. Specify the Stylesheet Profile ID.
    2. Specify the Template Name with the same value as the Stylesheet Profile ID.
    3. Select the Direction of "INBOUND".
    4. Select the Type of "XML".
    5. Select the For Message XML check box.
    6. Create a Stylesheet Content ID using the sample transmission XML created above.
      1. Upload the sample transmission XML.
  3. Define a Message Type:
    1. Select a Message Direction of "INBOUND".
    2. Select the Generate Transmission XML option button.
    3. In the Result Stylesheet Profile field, select the stylesheet profile created for the transmission XML.
    4. Indicated that a notification is be placed in the Message Center.
      1. Select "ALWAYS" in the Send To Message Center drop-down.
      2. Enter the Message Center User ID.
        OR

        Enter the Message Center Involved Party Qualifier.
      3. Enter the Message Center Stylesheet Profile ID to use for creating the Message Center entry.
  4. If the Message XML will be received without the Stylesheet Profile and Message Type specified in the XML, define a Message Profile. The Message Profile will be used to try to determine the correct stylesheet profile and message type.
    1. Enter an Attempt Sequence of "1".
    2. Enter the Stylesheet Profile for the sample message created above.
  5. The following are optional when the Message Profile, Stylesheet Profile, and Message Type are specified in the inbound message. Note that for submitting a message to the Message Center for an involved party, the association of Device to a Driver is needed.
    1. Create a Contact:
      1. Add the Message Profile ID defined above.
    2. Create a Device:
      1. Assign the Contact ID created above.
      2. Specify an External Device ID.

Related Topics