ContactSnapshot
The ContactSnapshot object preserves a record at a particular point in time of the Bill-To contact or Sold-To contact on a customer account. When invoices are posted, Zuora preserves the Bill To contact and Sold To contact of the invoices in the contact snapshots. If you subsequently update the contact information on a customer account, the original contact information at the time the invoice was posted is saved in ContactSnapshot object instances.
To preserve contact information when invoices are posted, you must have the following billing rule enabled:
Preserve snapshot of bill-to and sold-to contacts when billing documents are posted
You can retrieve the historical contact information by querying this object.
Field Descriptions
All field names are case sensitive. Check enumerated values in descriptions to confirm capitalization and spacing. See Field Types for additional information.
Name | Require to Create? | Allowed Operations |
Description |
---|---|---|---|
AccountId |
optional |
Query |
The Zuora account ID associated with this contact. This field is not required when you use the subscribe() call. This field is required for all other calls. Type: zns:ID Character limit: 32 Version notes: WSDL 85.0+ Values: a valid account ID |
Address1 |
optional |
Query |
The first line of the contact's address, which is often a street address or business name. Type: string Character limit: 255 Version notes: WSDL 85.0+ Values: a string of 255 characters or fewer |
Address2 | optional |
Query |
The second line of the contact's address. Type: string Character limit: 255 Version notes: WSDL 85.0+ Values: a string of 255 characters or fewer |
City | optional |
Query |
The city of the contact's address. Type: string Character limit: 40 Version notes: WSDL 85.0+ Values: a string of 40 characters or fewer |
ContactId |
optional |
Query |
The ID of the contact that has the snapshot. Type: zns:ID Character limit: 32 Version notes: WSDL 85.0+ Values: a valid contact ID |
Country | optional |
Query |
The country of the contact's address. If using Zuora Tax, be aware that it requires a country in the sold-to contact to calculate tax, and that a bill-to contact may be used if no sold-to contact is provided. Type: string Character limit: 32 : WSDL 85.0+ |
County | optional |
Query |
The country. May optionally be used by Z-Tax to calculate county tax. Type: string Character limit: 32 Version notes: WSDL 85.0+ Values: a string of 32 characters or fewer |
CreatedById | optional |
Query |
The ID of the Zuora user who created the contact.
Type: zns:ID Character limit: 32 Version notes: WSDL 85.0+ Values: automatically generated |
CreatedDate | optional |
Query |
The date when the contact was created.
Type: dateTime Character limit: 29 Version notes: WSDL 85.0+ Values: automatically generated |
Description | optional |
Query |
A description for the contact. Type: string Character limit: 100 Version notes: WSDL 85.0+ Values: a string of 100 characters or fewer |
Fax | optional |
Query |
The contact's fax number. Type: string Character limit: 40 Version notes: WSDL 85.0+ Values: a string of 40 characters or fewer |
FirstName | optional |
Query |
The contact's first name. Type: string Character limit: 100 Version notes: WSDL 85.0+ Values: a string of the contact's first name |
HomePhone | optional |
Query |
The contact's home phone number. Type: string Character limit: 40 Version notes: WSDL 85.0+ Values: a string of 40 characters or fewer |
LastName | optional |
Query |
The contact's last name. Type: string Character limit: 100 Version notes: WSDL 85.0+ Values: a string of 100 characters or fewer |
MobilePhone | optional |
Query |
The contact's mobile phone number. Type: string Character limit: 40 Version notes: WSDL 85.0+ Values: a string of 40 characters or fewer |
NickName | optional |
Query |
A nickname for the contact. Type: string Character limit: 100 Version notes: WSDL 85.0+ Values: a string of 100 characters or fewer |
OtherPhone | optional |
Query |
An additional phone number for the contact. Type: string Character limit: 40 Version notes: WSDL 85.0+ Values: a string of 40 characters or fewer |
OtherPhoneType | optional |
Query |
The type of the OtherPhone .
Type: string Character limit: 20 Version notes: WSDL 85.0+ Values: |
PersonalEmail | optional |
Query |
The contact's personal email address. Type: string Character limit: 80 Version notes: WSDL 85.0+ Values: a string of 80 characters or fewer |
PostalCode | optional |
Query |
The zip code for the contact's address. Type: string Character limit: 20 Version notes: WSDL 85.0+ Values: a string of 20 characters or fewer |
State | optional |
Query |
The state or province of the contact's address. If using Z-Tax, be aware that if the country is USA or Canada, Z-Tax requires a state or province in the sold-to contact to calculate tax, and that a bill-to contact may be used if no sold-to contact is provided. Type: string Character limit: 40 Version notes: WSDL 85.0+ |
TaxRegion | optional |
Query |
If using Z-Tax, a region string as optionally defined in your tax rules. Not required.
Type: string Character limit: 32 Version notes: WSDL 85.0+ Values: a string defined in your Z-Tax tax rules |
UpdatedById | optional |
Query |
The ID of the user who lasted updated the contact. Type: zns:ID Character limit: 32 Version notes: WSDL 85.0+ Values: automatically generated |
UpdatedDate | optional |
Query |
The date when the contact was last updated. Type: dateTime Character limit: 29 Version notes:WSDL 85.0+ Values: automatically generated |
WorkEmail | optional |
Query |
The contact's business email address. Type: string Character limit: 80 Version notes: WSDL 85.0+ Values: a string of 80 characters or fewer |
WorkPhone | optional |
Query |
The contact's business phone number. Type: string Character limit: 40 Version notes: WSDL 85.0+ Values: a string of 40 characters or fewer |
Example
Query a Snapshot of Bill To Contact
To retrieve previous Bill To contact information for an invoice:
-
Retrieve the ID of the snapshot of the Bill To contact of the invoice. In the following example, the ID of the invoice is
2c92c09546f5943c01471d5adf171d0d
.select BillToContactSnapshotId from Invoice where Id='2c92c09546f5943c01471d5adf171d0d'
This query returns the ID of a ContactSnapshot object. For example,
2c92c0855fc8fdf9015fc931240431d4
. -
Retrieve contact information from the ContactSnapshot object.
select AccountId, Address1, Address2, City, ContactId, Country, County, CreatedById, CreatedDate, Description, Fax, FirstName, HomePhone, LastName, MobilePhone, NickName, OtherPhone, OtherPhoneType, PersonalEmail, PostalCode, State, TaxRegion, UpdatedById, UpdatedDate, WorkEmail, WorkPhone from ContactSnapshot where Id = '2c92c0855fc8fdf9015fc931240431d4'