Skip to main content
Omnitracs Knowledge Base

Get Macro

getMacro

The getMacro web service retrieves the details of a macro template from QTRACS/Portal.

A macro template is a preformatted dynamic message with controlled content in QTRACS/Portal.
For more information about the use of macro templates in Text and Macro Messaging see the Text and Macro Messaging Concepts page.

MacroDefinition getMacro(String companyId, String direction, int number) throws WSException

  • companyId: (optional) A string, maximum length 10, specifying the unique company identifier.
    NOTE: If no companyId is specified, the company of the authorized user making the call will be used.
  • direction: A String that specifies the direction of the macro to retrieve.
                     Valid values are: "F" - forward macro
                                              "R" - return macro
  • number: An integer value that specifies the number of the macro to retrieve.
                   Valid values are: 1-63

For specific information about the MacroDefinition object returned by this web service, see the Macro Definition page.

Authorization Requirements

The credentials supplied with this method call (as specified in the accompanying WS-Security header) must be authorized to the following application(s) and their associated role-based permissions.

Required Application Licenses
- Remote Integration

Required User Permissions
- Can use QTRACS

Customer integrators are authorized to their own company's data only.

Exceptions

001 Unknown error.
002 Null value in one of the SQL null indicator fields.
003 Authenticated company not specified.
004 Authenticated user not specified.
005 User is not authorized.
006 Invalid macro direction specified.
007 Invalid macro number specified.
008 Specified macro does not exist.
009 Invalid company id.

Sample getMacro Request

Only the SOAP body is shown. To see a sample SOAP Envelope and Header, see the Web Service Security page.

<soap:Body>

   <getMacro>

      <companyId>MYCOMPANY</companyId>

      <direction>R</direction>

      <number>7</number>

   </getMacro>

</soap:Body>

The macro as viewed in the QTRACS/Portal UI is shown below:

Sample getMacro Response

The response below is representative of the Trailer Swap macro shown in the image above.

<soap:Body>

    <getMacro xmlns="http://websvcs.qtracswebws">

        <macro xmlns="">

            <assocRtnMac>0</assocRtnMac>

            <definitionStatus>0000</definitionStatus>

            <description>Trailer Swap Complete</description>

            <direction>R</direction>

            <macroItemList>

                <MacroItem>

                    <column>1</column>

                    <dictName></dictName>

                    <dictTag></dictTag>

                    <groupName></groupName>

                    <grouNum>0</groupNum>

                    <groupTag></groupTag>

                    <length>0</length>

                    <required>false</required>

                    <row>1</row>

                    <type>label</type>

                    <value>    **** TRAILER SWAP COMPLETE ****</value>

                </MacroItem>

                <MacroItem>

                    <column>1</column>

                    <dictName></dictName>

                    <dictTag></dictTag>

                    <groupName></groupName>

                    <grouNum>0</groupNum>

                    <groupTag></groupTag>

                    <length>0</length>

                    <required>false</required>

                    <row>2</row>

                    <type>label</type>

                    <value>SWAPPED WITH TRUCK#</value>

                </MacroItem>

                <MacroItem>

                    <column>21</column>

                    <dictName>TruckNumber</dictName>

                    <dictTag>truckNumber</dictTag>

                    <groupName></groupName>

                    <grouNum>0</groupNum>

                    <groupTag></groupTag>

                    <length>8</length>

                    <required>true</required>

                    <row>2</row>

                    <type>field</type>

                    <value></value>

                </MacroItem>

                <MacroItem>

                    <column>1</column>

                    <dictName></dictName>

                    <dictTag></dictTag>

                    <groupName></groupName>

                    <grouNum>0</groupNum>

                    <groupTag></groupTag>

                    <length>0</length>

                    <required>false</required>

                    <row>3</row>

                    <type>label</type>

                    <value>OLD TRLR#</value>

                </MacroItem>

                <MacroItem>

                    <column>11</column>

                    <dictName>TrailerNumber</dictName>

                    <dictTag>trailerNumber</dictTag>

                    <groupName>TrailerSwap</groupName>

                    <grouNum>1</groupNum>

                    <groupTag>trailerSwap</groupTag>

                    <length>12</length>

                    <required>true</required>

                    <row>3</row>

                    <type>field</type>

                    <value></value>

                </MacroItem>

                <MacroItem>

                    <column>1</column>

                    <dictName></dictName>

                    <dictTag></dictTag>

                    <groupName></groupName>

                    <grouNum>0</groupNum>

                    <groupTag></groupTag>

                    <length>0</length>

                    <required>false</required>

                    <row>4</row>

                    <type>label</type>

                    <value>NEW TRLR#</value>

                </MacroItem>

                <MacroItem>

                    <column>11</column>

                    <dictName>TrailerNumber</dictName>

                    <dictTag>trailerNumber</dictTag>

                    <groupName>TrailerSwap</groupName>

                    <grouNum>1</groupNum>

                    <groupTag>trailerSwap</groupTag>

                    <length>12</length>

                    <required>true</required>

                    <row>4</row>

                    <type>field</type>

                    <value></value>

                </MacroItem>

                <MacroItem>

                    <column>1</column>

                    <dictName></dictName>

                    <dictTag></dictTag>

                    <groupName></groupName>

                    <grouNum>0</groupNum>

                    <groupTag></groupTag>

                    <length></length>

                    <required>false</required>

                    <row>5</row>

                    <type>label</type>

                    <value>SETTING:</value>

                </MacroItem>

                <MacroItem>

                    <column>10</column>

                    <dictName>Setting</dictName>

                    <dictTag>setting</dictTag>

                    <groupName></groupName>

                    <grouNum>0</groupNum>

                    <groupTag></groupTag>

                    <length>5</length>

                    <required>false</required>

                    <row>5</row>

                    <type>field</type>

                    <value></value>

                </MacroItem>

                <MacroItem>

                    <column>16</column>

                    <dictName></dictName>

                    <dictTag></dictTag>

                    <groupName></groupName>

                    <grouNum>0</groupNum>

                    <groupTag></groupTag>

                    <length></length>

                    <required>false</required>

                    <row>5</row>

                    <type>label</type>

                    <value>     READING:</value>

                </MacroItem>

                <MacroItem>

                    <column>30</column>

                    <dictName>Reading</dictName>

                    <dictTag>reading</dictTag>

                    <groupName></groupName>

                    <grouNum>0</groupNum>

                    <groupTag></groupTag>

                    <length>5</length>

                    <required>false</required>

                    <row>5</row>

                    <type>field</type>

                    <value></value>

                </MacroItem>

                <MacroItem>

                    <column>1</column>

                    <dictName></dictName>

                    <dictTag></dictTag>

                    <groupName></groupName>

                    <grouNum>0</groupNum>

                    <groupTag></groupTag>

                    <length></length>

                    <required>false</required>

                    <row>6</row>

                    <type>label</type>

                    <value>VENT DOOR:</value>

                </MacroItem>

                <MacroItem>

                    <column>12</column>

                    <dictName>VentDoor</dictName>

                    <dictTag>ventDoor</dictTag>

                    <groupName></groupName>

                    <grouNum>0</groupNum>

                    <groupTag></groupTag>

                    <length>5</length>

                    <required>false</required>

                    <row>6</row>

                    <type>field</type>

                    <value></value>

                </MacroItem>

            </macroItemList>

            <msgSupr>false</msgSupr>

            <name>Trailer Swap</name>

            <number>7</number>

            <routeCoverage>true</routeCoverage>

            <rtnMacCoverage>ROMANOWSKI</rtnMacCoverage>

            <usage>127</usage>

            <version>42</version>

        </macro>

    </getMacro>

</soap:Body>

  • Was this article helpful?