GetRecord()

Abstract

The GetRecord() API function is an XmlHttp function to retrieve the user’s records for which they are the “owner” in TrackerRMS.  This function must be called after the LogonUser() function.

Although the GetRecord() function can be applied to all record types when requesting records via the API, each record type will return a different schema depending on the record type, for example fetching Account information will provide a schema with fields relating to an Account whereas fetching Contact information will provide a schema with fields relating to a Contact and so on.

API Address

https://api.tracker-rms.com/WebAPI/XmlHttpGetRecord.aspx

Request Format

The input format XML for this function is as follows:

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <GetRecord>
            <UserCredentials>
                <SecurityToken></SecurityToken>
                <Username></Username>
                <Password></Password>
            </UserCredentials>
            <RecordType></RecordType>
            <RecordId></RecordId>
        </GetRecord>
    </WebAPI>
</TrackerRMS>
Parameter Notes
<SecurityToken> This will be the 40 character security token obtained from the LogonUser() function
<Username> The username is typically the email address for the user in the format name@domain.com
<Password> The password will be the same as their web based password and can contain a combination of upper case, lower case and alpha-numeric characters
<RecordType> The record type indicates the type of record required and is set to one of the following values.  Note, “All” will return all records at once.
Activities             Leads                    Resources                                                               Accounts             Opportunities     Tickets                                                                         Contacts              Projects                All
<RecordId> The unique identifier for the record required.

Response Format

The function will return the relevant schema depending on the <RecordType> parameter set in the API request call.

Each of these record types will return with the standard RequestStatus section followed by the individual records that are “owned” by the current user.

Note: All return values are plain text and so no look-up or reference tables are passed back.

Activities

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <RequestStatus>
            <ReturnCode></ReturnCode>
            <ReturnDescription></ReturnDescription>
            <ReturnRecordCount></ReturnRecordCount>
        </RequestStatus>
        <GetRecord_Return>
            <Activities>
                <Activity id=””>
                    <ActivityType></ActivityType>
                    <Subject></Subject>
                    <Person></Person>
                    <PersonTelephone></PersonTelephone>
                    <PersonEmail></PersonEmail>
                    <Opportunity id=””></Opportunity>
                    <Status></Status>
                    <Priority></Priority>
                    <DateDue></DateDue>
                    <TimeDue></TimeDue>
                    <StartDate></StartDate>
                    <EndDate></EndDate>
                    <StartTime></StartTime>
                    <EndTime></EndTime>
                    <ContactType></ContactType>
                    <Notes></Notes>
                </Activity>
                <Activity id=””>
                ...
                </Activity>
                ...
            </Activities>
        </GetRecord_Return>
    </WebAPI>
</TrackerRMS>

Note the “id” attribute will be a unique identifier for the record.  The <ActivityType> value will determine the type of activity being passed, for example Telephone, Email, Appointment etc.  Only certain date and time fields will be relevant depending on the type of Activity, as follows:

<ActivityType> value Relevance
“Appointment”, “Interview”, “WebEx” Start Date, End Date, Start Time and End Time are relevant
Date Due and Time Due are not relevant
All other Activity Types Start Date, End Date, Start Time and End Time are not relevant
Date Due and Time Due are relevant

Accounts

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <RequestStatus>
            <ReturnCode></ReturnCode>
            <ReturnDescription></ReturnDescription>
            <ReturnRecordCount></ReturnRecordCount>
        </RequestStatus>
        <GetRecord_Return>
            <Accounts>
                <Account id=””>
                    <AccountName></AccountName>
                    <ParentAccount></ParentAccount>
                    <Rank></Rank>
                    <Department></Department>
                    <Territory></Territory>
                    <AccountTypes>
                        <AccountType></AccountType>
                        <AccountType></AccountType>
                        ...
                     </AccountTypes>
                     <Turnover></Turnover>
                     <TargetRevenue></TargetRevenue>
                     <PrimaryAddress>
                         <AddressLine1></AddressLine1>
                         <AddressLine2></AddressLine2>
                         <Town></Town>
                         <County></County>
                         <PostCode></PostCode>
                         <Country></Country>
                         <Telephone></Telephone>
                         <Fax></Fax>
                    </PrimaryAddress>
                    <Email></Email>
                    <Website></Website>
                </Account>
                <Account id=””>
                ...
                </Account>
                ...
           </Accounts>
        </GetRecord_Return>
    </WebAPI>
</TrackerRMS>

Notethe “id” attribute will be a unique identifier for the record.

Contacts

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <RequestStatus>
            <ReturnCode></ReturnCode>
            <ReturnDescription></ReturnDescription>
            <ReturnRecordCount></ReturnRecordCount>
        </RequestStatus>
        <GetRecord_Return>
            <Contacts>
                <Contact id=””>
                    <FirstName></FirstName>
                    <Surname></Surname>
                    <DisplayAs></DisplayAs>
                    <JobTitle></JobTitle>
                    <AccountName id=””></AccountName>
                    <Role></Role>
                    <ContactTypes>
                        <ContactType></ContactType>
                        <ContactType></ContactType>
                        ...
                    </ContactTypes>
                    <BusinessUnit></BusinessUnit>
                    <Department></Department>
                    <Office></Office>
                    <Territory></Territory>
                    <AddressLine1></AddressLine1>
                    <AddressLine2></AddressLine2>
                    <Town></Town>
                    <County></County>
                    <PostCode></PostCode>
                    <Country></Country>
                    <BusinessPhone></BusinessPhone>
                    <HomePhone></HomePhone>
                    <MobilePhone></MobilePhone>
                    <OtherPhone></OtherPhone>
                    <Fax></Fax>
                    <Pager></Pager>
                    <Email></Email>
                    <Website></Website>
                </Contact>
                <Contact id=””>
                ...
                </Contact>
                ...
            </Contacts>
        </GetRecord_Return>
    </WebAPI>
</TrackerRMS>

Note:  the “id” attribute will be a unique identifier for the record.

Leads

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <RequestStatus>
            <ReturnCode></ReturnCode>
            <ReturnDescription></ReturnDescription>
            <ReturnRecordCount></ReturnRecordCount>
        </RequestStatus>
        <GetRecord_Return>
            <Leads>
                <Lead id=””>
                    <LeadId></LeadId>
                    <Name></Name>
                    <Date></Date>
                    <AssignedTo></AssignedTo>
                    <Department></Department>
                    <ProductService></ProductService>
                    <AccountName id=””></AccountName>
                    <Opportunity id=””></Opportunity>
                    <Person></Person>
                    <Source></Source>
                    <Status></Status>
                    <Territory></Territory>
                    <PotentialValue></PotentialValue>
                    <PotentialAwardDate></PotentialAwardDate>
                    <Description></Description>
                    <Age></Age>
                    <MANDACT></MANDACT>
                </Lead>
                <Lead id=””>
                ...
                </Lead>
                ...
            </Leads>
        </GetRecord_Return>
    </WebAPI>
</TrackerRMS>

Notethe “id” attribute will be a unique identifier for the record.  The <LeadId>element is different from the id attribute as it is a formatted version of the id.

For example

<Lead id=”1”>
    <LeadId>L0001</LeadId>
    ...

Opportunities

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <RequestStatus>
            <ReturnCode></ReturnCode>
            <ReturnDescription></ReturnDescription>
            <ReturnRecordCount></ReturnRecordCount>
        </RequestStatus>
        <GetRecord_Return>
            <Opportunities>
                <Opportunity id=””>
                    <OpportunityId></OpportunityId>
                    <Name></Name>
                    <Owner></Owner>
                    <AccountName id=””></AccountName>
                    <Contact id=””></Contact>
                    <ContactRole></ContactRole>
                    <DateOpened></DateOpened>
                    <Source></Source>
                    <Status></Status>
                    <Type></Type>
                    <Territory></Territory>
                    <Value></Value>
                    <Probability></Probability>
                    <FactoredValue></FactoredValue>
                    <AwardDate></AwardDate>
                    <InvoiceDate></InvoiceDate>
                    <ContractStartDate></ContractStartDate>
                    <ContractEndDate></ContractEndDate>
                    <Description></Description>
                    <MANDACT></MANDACT>
                    <Orders>
                        <Order id=””>
                            <ProductCode></ProductCode>
                            <ProductName></ProductName>
                            <UnitValue></UnitValue>
                            <Quantity></Quantity>
                            <TotalValue></TotalValue>
                        </Order>
                        <Order id=””>
                        </Order>
                        ...
                    </Orders>
                </Opportunity>
                <Opportunity id=””>
                ...
                </Opportunity>
                ...
            </Opportunities>
        </GetRecord_Return>
    </WebAPI>
</TrackerRMS>

Note the “id” attribute will be a unique identifier for the record.  The <OpportunityId>element is different from the id attribute as it is a formatted version of the id.

For example

<Opportunity id=”1”>
    <OpportunityId>OPP-0001</OpportunityId>
    ...

 Projects

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <RequestStatus>
            <ReturnCode></ReturnCode>
            <ReturnDescription></ReturnDescription>
            <ReturnRecordCount></ReturnRecordCount>
        </RequestStatus>
        <GetRecord_Return>
            <Projects>
                <Project id=””>
                    <ProjectId></ProjectId>
                    <Name></Name>
                    <Manager></Manager>
                    <AccountName id=””></AccountName>
                    <Contact id=””></Contact>
                    <Priority></Priority>
                    <Status></Status>
                    <Type></Type>
                    <Health></Health>
                    <Territory></Territory>
                    <StartDate></StartDate>
                    <EndDate></EndDate>
                    <Summary></Summary>
                    <Issues></Issues>
                    <Risks></Risks>
                    <ChangeRequests></ChangeRequests>
                    <Tasks>
                        <Task id="">
                            <ActivityName/>
                            <ActivityStatus/>
                            <ActivityType/>
                            <ActivityNote/>
                            <StartDate/>
                            <EndDate/>
                            <BudgetedDays/>
                            <PayRate/>
                            <ChargeRate/>
                            <ChargePeriod/>
                            <TicketId/>
                            <Billable/>
                            <ActivityName/>
                        </Task>
                    </Tasks>
                </Project>
                <Project id=””>
                ...
                </Project>
                ...
            </Projects>
        </GetRecord_Return>
    </WebAPI>
</TrackerRMS>

Note:  the “id” attribute will be a unique identifier for the record.  The <ProjectId>element is different from the id attribute as it is a formatted version of the id.

For example

<Project id=”1”>
    <ProjectId>P0001</ProjectId>
    ...

Resources

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <RequestStatus>
            <ReturnCode></ReturnCode>
            <ReturnDescription></ReturnDescription>
            <ReturnRecordCount></ReturnRecordCount>
        </RequestStatus>
        <GetRecord_Return>
            <Resources>
                <Resource id=””>
                    <FirstName></FirstName>
                    <Surname></Surname>
                    <DisplayAs></DisplayAs>
                    <Position></Position>
                    <WorkTypes>
                        <WorkType></WorkType>
                        <WorkType></WorkType>
                        ...
                    </WorkTypes>
                    <Status></Status>
                    <Department></Department>
                    <Territory></Territory>
                    <AddressLine1></AddressLine1>
                    <AddressLine2></AddressLine2>
                    <Town></Town>
                    <County></County>
                    <PostCode></PostCode>
                    <Country></Country>
                    <HomePhone></HomePhone>
                    <WorkPhone></WorkPhone>
                    <MobilePhone></MobilePhone>
                    <OtherPhone></OtherPhone>
                    <Email></Email>
                    <OtherEmail></OtherEmail>
                    <CurrentSalary></CurrentSalary>
                    <DesiredSalary></DesiredSalary>
                    <PayRate></PayRate>
                    <ChargeRate></ChargeRate>
                    <NoticePeriod></NoticePeriod>
                    <SummarySynopsis></SummarySynopsis>
                    <InterviewDate></InterviewDate>
                    <InterviewResult></InterviewResult>
                    <Available></Available>
                    <Availability></Availability>
                    <PlacementSummary></PlacementSummary>
                    <WorkSummary></WorkSummary>
                    <Skills>
                        <Skill id=””>
                            <SkillName></SkillName>
                            <SkillValue></SkillValue>
                        </Skill>
                    </Skills>
                    <ResumeText></ResumeText>
                </Resource>
                <Resource id=””>
                ...
                </Resource>
                ...
            </Resources>
        </GetRecord_Return>
    </WebAPI>
</TrackerRMS>

Note:  the “id” attribute will be a unique identifier for the record.  Resume Text will be CDATA formatted.

Tickets

<?xml version="1.0"?>
<TrackerRMS>
    <WebAPI>
        <RequestStatus>
            <ReturnCode></ReturnCode>
            <ReturnDescription></ReturnDescription>
            <ReturnRecordCount></ReturnRecordCount>
        </RequestStatus>
        <GetRecord_Return>
            <Tickets>
                <Ticket id=””>
                    <TicketId></TicketId>
                    <Subject></Subject>
                    <Description></Description>
                    <Type></Type>
                    <ContactType></ContactType>
                    <Status></Status>
                    <Territory></Territory>
                    <ProductService></ProductService>
                    <Version></Version>
                    <Priority></Priority>
                    <Department></Department>
                    <TicketDateTime></TicketDateTime>
                    <DueDateTime></DueDateTime>
                    <AccountName></AccountName>
                    <ContactName></ContactName>
                    <Telephone></Telephone>
                    <Email></Email>
                    <AssignedTo></AssignedTo>
                    <Resolution></Resolution>
                    <LastUpdatedDateTime></LastUpdatedDateTime>
                    <LastUpdatedBy></LastUpdatedBy>
                </Ticket>
                <Ticket id=””>
                ...
                </Ticket>
                ...
            </Tickets>
        </GetRecord_Return>
    </WebAPI>
</TrackerRMS>

Note:  the “id” attribute will be a unique identifier for the record.  The <TicketId>element is different from the id attribute as it is a formatted version of the id.

For example

<Ticket id=”1”>
    <TicketId>TKT-000001</TicketId>
    ...