다음을 통해 공유


Gathering Data for Billing Purposes

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The following best practice shows how to gather billing data using the API.

Step 1. Use the ListMeetingsRequest element with a TimeIntervalQuery element and the visitedIn parameter. This gives you a list of all meetings, including deleted meetings, which had visitors during the specified time period (day, week, and month).

Note

The following ListMeetingsRequest code includes startTime and endTime of each meeting (when each meeting is scheduled to start and end). It is not required that these two options are included in the FieldList; they do not provide any required information. What they do provide, if you want to use it, is a way to check whether a visit happened during the scheduled time of the meeting.

The following code shows the ListMeetingsRequest sent to the conference center.

<PlaceWareConfCenter authUser="apiuser" authPassword="Pa$$w0rd">
    <ListMeetingsRequest listDeleted="True">
        <TimeIntervalQuery fieldName="visitedIn">
                <TimeInterval startTime="2006-03-19T00:00:01Z"
                               endTime="2006-03-25T23:59:59Z">
                </TimeInterval>
        </TimeIntervalQuery>
            <FieldList>
                 <Name>owner</Name>
                 <Name>name</Name>
                 <Name>startTime</Name>
                 <Name>endTime</Name>
            </FieldList>
    </ListMeetingsRequest>
</PlaceWareConfCenter>

The following shows the reply returned from the conference center.

<MeetingReply>
    <OptionList>
       <StringOption value="Chris Ashton" name="owner"></StringOption>
       <StringOption value="mymeeting" name="name"></StringOption>
       <TimeOption value="2006-03-24T17:00:00Z" name="startTime"></TimeOption>
       <TimeOption value="2006-03-24T18:00:00Z" name="endTime"></TimeOption>
    </OptionList>
</MeetingReply>

Step 2. Loop through all meetings provided by step 1 and use a ListVisitorsRequest on each meeting name, using a similar TimeIntervalQuery but with the parameter set to startTime, which is the startTime of each visit.

The following code shows the request sent to the conference center.

<?xml version="1.0" encoding="UTF-8"?>
<PlaceWareConfCenter authUser="apiuser" authPassword="Pa$$w0rd">
        <ListVisitorsRequest deletedOK="True">
                <StringQuery fieldName="name" operator="=" value="mymeeting" />
                <TimeIntervalQuery fieldName="startTime">
                        <TimeInterval startTime="2006-03-19T00:00:01Z"
                                        endTime="2006-03-25T23:59:59Z">
                        </TimeInterval>
                </TimeIntervalQuery>
                <FieldList>
                        <Name>userName</Name>
                        <Name>vid</Name>
                        <Name>startTime</Name>
                        <Name>endTime</Name>
                        <Name>role</Name>
                </FieldList>
        </ListVisitorsRequest>
</PlaceWareConfCenter>

The following shows the reply returned from the conference center.

<PlaceWareConfCenter>
   <ListVisitorsReply>
      <Visitor>
        <OptionList>
        <StringOption value="Chris Ashton" name="userName"></StringOption>
        <StringOption value="rtw8sxv39gc6kgnq" name="vid"></StringOption>
        <TimeOption value="2006-03-24T17:01:32Z" name="startTime"></TimeOption>
        <TimeOption value="2006-03-24T18:29:00Z" name="endTime"></TimeOption>
        <EnumerationOption value="Presenter" name="role">
           <String>Audience</String>
           <String>Presenter</String>
        </EnumerationOption>
        </OptionList>
      </Visitor>
   </ListVisitorsReply>
</PlaceWareConfCenter>

Step 3. Using the data results from the ListVisitors calls, calculate the duration of each visitor to each meeting, and then accumulate, format, and present the data as you desire.

See Also

Concepts

ListMeetingsRequest Element

ListVisitorsRequest Element

Best Practices