Available fields
This topic describes some of the fields available, and it describes how to access different types of fields.
Generic fields
These are some fields available in the survey table for all companies.
Survey information
Metadata about the survey
Field | Type | Description |
---|---|---|
surveyid | INTEGER | Survey ID for internal use (e.g., RI link) Important: Beginning with the Winter 2020 release, the length of Survey IDs is increased to 64 bits (values can be greater than 2 billion). Make sure that your application can handle these values for Survey ID fields. Consider storing these values as text or as a big integer (signed 2's-compliment 64-bit integer).
|
customerid | INTEGER | Customer ID for this survey |
responsedate | DATE | Response Date |
survey_language | ENUMERATED | Survey language |
survey_method | ENUMERATED | Survey method |
survey_program | TEXT | Survey program |
Respondent personal information
Name and contact information
Field | Type | Description |
---|---|---|
lastname | TEXT | Last name |
firstname | TEXT | First name |
fullname | TEXT | Name |
TEXT | ||
phone | TEXT | Phone |
fulladdress | TEXT | Address |
address | TEXT | Address |
address2 | TEXT | Address 2 |
city | TEXT | City |
postalcode | TEXT | Zip/postal code |
state | TEXT | State/province |
Comments
Field | Type | Description |
---|---|---|
has_comment | INTEGER | Survey has comment (1 or 0) |
comments | TEXT | All survey comments concatenated |
Business unit information
Information about the customer's touchpoint (e.g. a store or a hotel or a call center agent depending on type of business)
Field | Type | Description |
---|---|---|
unitid | TEXT | Unit id |
unit_city | TEXT | Unit city |
unit_postal_code | TEXT | Unit zip/postal code |
unit_street_address | TEXT | Unit state/province |
Alert information
Alert and case management information
Field | Type | Description |
---|---|---|
has_alert | INTEGER | Survey has alert (1 or 0) |
alert_status | TEXT | Alert status of survey (if any) |
alert_type | TEXT | Alert type of survey (if any) |
survey_assignee | ENUMERATED | Alert assignee |
rapid_response_status | ENUMERATED | Rapid Response status for this survey (e.g., sent or not) |
log_notes | TEXT | All log notes combined (if any) |
Client-specific fields
Most of the fields will be specific to the particular dataset of the company. Thus, to find out what client-specific fields are available, you have to run the Metadata query.
Derived fields
For some of the fields, it is possible to modify their behavior by adding a dot and a modifier to the key of the field, such as
fieldkey.modifier
unitid.name
All companies have the unitid
field, representing the business unit / "lowest node" of the reporting hierarchy (e.g., a hotel or a store or a call center agent). The unitid
field gives you the identifier of the unit, but you can also use unitid.name
to retrieve the name.
Date fields
For date fields, like responsedate or other fields with DATE encoding, it is possible to group the days at several granularities using either of the following modifiers:
- year
- year_and_month
- month (reports by month, 1-12, so January of 2008 and January of 2009 are the same)
- time_of_year (reports by month and day, so January 1st of 2008 is the same as January 1st of 2009)
- day_of_month (reports by day of month, 1-31)
- week (reports by week of the year, 1-52)
- weekday (reports by day of week, 1-7)
- full (reports every day, equivalent to not adding a modifier)
Query example
SELECT responsedate.year_and_month, AVG(br_overall_experience) FROM SURVEY
URL example
https://api.medallia.com/mainstreet?user=john&pass=Ypass12&query=SELECT+responsedate.year_and_month%2C+AVG%28br_overall_experience%29+FROM+SURVEY&output=csv&version=1&apikey=5hxf4qz2qzjuxm46686csnwk
Result
responsedate.year_and_month | AVG(br_overall_experience) |
2005-01 | 6.419064748201439 |
2005-02 | 6.912269129287599 |
2005-03 | 7.189665653495441 |
2005-04 | 7.296676737160121 |
2005-05 | 7.445538461538462 |
2005-06 | 7.788036410923277 |
2005-07 | 7.782370820668693 |
2005-08 | 7.585247883917775 |
2005-09 | 7.578009828009828 |
2005-10 | 7.403147699757869 |
2005-11 | 7.00507614213198 |
2005-12 | 7.0509898020395925 |
2006-01 | 6.397350993377484 |
2006-02 | 7.046481601032925 |
2006-03 | 7.155413271245634 |
2006-04 | 7.353976531942633 |
2006-05 | 7.465761511216057 |
2006-06 | 7.7065830721003135 |
2006-07 | 7.7328519855595665 |
2006-08 | 7.664677804295943 |
2006-09 | 7.613956466069142 |
2006-10 | 7.384150030248034 |
2006-11 | 7.076219512195122 |
2006-12 | 6.98234552332913 |