Skip to content

Address Data

Contacts and addresses are an important part of every invoice – they determine the recipient of the invoice and the way of distribution. JustOn provides several contact and address fields, which serve different purposes. This document outlines how these fields interact, how to apply them to support your invoicing and dunning processes, and how to use contact roles to automate the selection of contacts and addresses.

General Address Concepts

There are several types of addresses available on the Invoice object. The main address that determines the legal recipient of the invoice is the billing address, which is copied from the account's billing address. If required, JustOn can override the billing address from an associated subscription using the legal address fields, or, from other source records, using the ON field mechanism.

In order to determine the postal mail recipient, JustOn provides the mailing address fields on the invoice. By default, the invoice template (v1) uses custom placeholders to fetch the mailing address data and to fill the recipient address field. Note that if the billing address differs from the mailing address, the two addresses are printed to the invoice PDF in order to specify both the legal recipient and the recipient for the postal distribution (see PDF Contents).

Your business may require to distinguish between the billing address and the shipping address. This is why the invoice includes shipping address fields as well. They are, however, not used for sending invoices and therefore not used in the invoice PDF. This information rather provides a means to store the shipping destination for physical goods, which is decisive for calculating applicable taxes (see also Using Billing Address for Tax Calculation).

JustOn supports several ways to actually distribute invoice or statement documents - you can send them by email or store them to specific locations from where you can print them for postal delivery.

The email address fields are used to store email addresses of the recipients. You can either just enter an email address or exercise a more fine-grained control using the CC and BCC email addresses.

For details about document distribution, see

Emailing Invoice PDF Documents
Emailing Account Statements
Emailing Dunning Reminders
Export to Cloud Storage Services
Redistributing Invoice PDF Documents
Redistributing Account Statements
Redistributing Dunning Reminders

Address Data Flow

As mentioned in General Address Concepts, the billing address is taken from the account. This address represents the main address that determines the legal recipient of the invoice. A legal address as specified on a subscription or, respectively, corresponding ON fields from other source records override the billing address.

All other address fields, like the mailing address (which is forwarded as the recipient address by default), are copied from the associated contacts upon invoice or statement creation. This allows to store address data in a central location: the Contact object.

addresses
Using address data for invoices or dunnings

Using Contacts on Manual Invoice Creation

When manually creating a new invoice as described in Manually Generating an Individual Invoice, you are presented a dialog that allows for specifying the

  • Contact: The primary contact to which the invoice will be sent.
  • Mailing Contact: The contact that provides the mailing address for postal distribution.
  • Email Contact: The contact that provides the primary email address. Additional email addresses that will receive the invoice can be specified in the Email CC and Email BCC fields.

Info

If specified, Mailing Contact and Email Contact override Contact.

If not specified, Mailing Contact and Email Contact fall back to Contact.

Using Contact Roles With Invoice Run and Statement Run

You can pre-populate the contact and address fields using contact roles set on contacts when

JustOn supports contact roles as defined using a custom picklist field JustOn Contact Role on the Contact object.

Info

As of JustOn 2.65, this mechanism replaces the Account Contact Role functionality in Salesforce Classic, which is no longer supported by Salesforce.

For compatibility reasons, JustOn still supports existing Salesforce Classic Account Contact Roles. If available, they take precedence over the value set in the JustOn Contact Role field.

JustOn supports contact roles for the following use cases:

Use Case Fallback to
Invoice Contact
Invoice Mailing Contact Invoice Contact
Invoice Email Contact Invoice Contact
Invoice Email CC Contact
Invoice Email BCC Contact
Dunning Contact Invoice Contact
Dunning Mailing Contact Invoice Mailing Contact
Dunning Email Contact Invoice Email Contact
Dunning Email CC Contact Invoice Email CC Contact
Dunning Email BCC Contact Invoice Email BCC Contact

This illustrates that there are again some fallbacks to consider when using contact roles:

  • The Invoice Mailing Contact and Invoice Email Contact use the Invoice Contact as a fallback, so you do not need to provide the three of them in order to correctly populate the mailing and email addresses, unless you want to use different contacts.
  • If you want to use different recipient information for dunning reminders, you can use the dunning contact roles. Thanks to the implemented fallbacks to the corresponding invoice contact roles, you do not need to take any action if the recipients of invoices and dunning reminders are the same.

Note

Make sure to not assign two or more contacts with the same role to an account. If this is the case, JustOn randomly picks one of them, which may produce unwanted results.

For details about enabling and defining contact roles, see How to use JustOn contact roles? or the corresponding context-specific documentation

Overriding Contacts and Contact Roles

Be aware that you can still override the address data fields as retrieved from contacts or contact roles.

From subscriptions: Subscriptions have contact and email fields that are named exactly as the invoice fields. When an invoice is created from a subscription (either manually or during an invoice run), the subscription fields take precedence and override all other rules. This allows, for example, to store dedicated billing information on an individual subscription only, leaving the account data untouched.

Manually: You can override all fields of Draft invoices manually. This is useful if you must modify a single invoice only and do not expect to apply these changes in the future. Note that changes to address fields are not written back to the original account and contacts. The invoice stores a copy of the corresponding values in order to be able to retrieve the invoice data later, even if the original objects have changed.

Subscription Contact Role Preview

To get a better understanding of the result of all contact roles and overrides from the subscription, JustOn provides a specific section on the subscription detail page: the Contact Role Preview. It shows a preview of the contacts that are used when a new invoice is created. If you are not satisfied with the result, you can either edit the contact roles of the associated account, or you can specify the contacts on the subscription. The Contact Role Preview will immediately show these modifications.

Data Origin Overview

The following overviews describe the default behavior. If your business requires different address data, you can use the ON field mechanism to insert other data to the produced invoice or statement records, or create new custom placeholders to retrieve other data when generating PDF files.

Info

Be aware of these specifics:

  • Mailing Contact and Email Contact both override and fall back to Contact.
  • The (default) placeholders in the Recipient Address field of the template fetch mailing address data and fall back to billing address data only in case there is no mailing address data.
  • If mailing address data is given, even if incomplete, the mailing address completely overrides the fallback to the billing address when setting the address for postal distribution in the Recipient Address field.
  • If the billing address differs from the mailing address, the two given addresses are printed to the PDF.

Invoice Address Data

Field Subordinate Field Possible Data Origin Template (v1) Target
Field [Placeholder]
Billing Street Account: Billing Street
Subscription: Legal Street
Billing Address [Billing Street]
Billing Postal Code Account: Billing Postal Code
Subscription: Legal Postal Code
Billing Address [Billing Postal Code]
Billing City Account: Billing City
Subscription: Legal City
Billing Address [Billing City]
Billing State Account: Billing State
Subscription: Legal State
Billing Address [Billing State]
Billing Country Account: Billing Country
Subscription: Legal Country
Billing Address [Billing Country]
Shipping Street Account: Shipping Street
For information purposes only.
Shipping Postal Code Account: Shipping Postal Code
For information purposes only.
Shipping City Account: Shipping City
For information purposes only.
Shipping State Account: Shipping State
For information purposes only.
Shipping Country Account: Shipping Country
For information purposes only.
Contact Account: Contact
Account: Contact Role Invoice Contact
Subscription: Contact
Mailing Contact Account: Contact
Account: Contact Role Invoice Mailing Contact, Invoice Contact
Subscription: Mailing Contact
Mailing Salutation (Mailing) Contact: Salutation
Mailing First Name (Mailing) Contact: First Name
Mailing Last Name (Mailing) Contact: Last Name
Mailing Street (Mailing) Contact: Mailing Street Recipient Address [Recipient Street]
Mailing Postal Code (Mailing) Contact: Mailing Postal Code Recipient Address [Recipient Postal Code]
Mailing City (Mailing) Contact: Mailing City Recipient Address [Recipient City]
Mailing State (Mailing) Contact: Mailing State Recipient Address [Recipient State]
Mailing Country (Mailing) Contact: Mailing Country Recipient Address [Recipient Country]
Email Contact Account: Contact
Account: Contact Role Invoice Email Contact, Invoice Contact
Subscription: Email Contact
Email Salutation (Email) Contact: Salutation
Email First Name (Email) Contact: First Name
Email Last Name (Email) Contact: Last Name
Email (Email) Contact: Email
Email CC Subscription: Email CC
Email BCC Subscription: Email BCC

Dunning Address Data

Field Subordinate Field Possible Data Origin Template (v1) Target
Field [Placeholder]
Billing Street Invoice: Billing Street Billing Address [Billing Street]
Billing Postal Code Invoice: Billing Postal Code Billing Address [Billing Postal Code]
Billing City Invoice: Billing City Billing Address [Billing City]
Billing State Invoice: Billing State Billing Address [Billing State]
Billing Country Invoice: Billing Country Billing Address [Billing Country]
Contact Invoice: Contact
Account: Contact Role Invoice Contact, Dunning Contact
Mailing Contact Invoice: Mailing Contact
Account: Contact Role Invoice Contact, Dunning Contact
Mailing Salutation (Mailing) Contact: Salutation
Mailing First Name (Mailing) Contact: First Name
Mailing Last Name (Mailing) Contact: Last Name
Mailing Street (Mailing) Contact: Mailing Street Recipient Address [Recipient Street]
Mailing Postal Code (Mailing) Contact: Mailing Postal Code Recipient Address [Recipient Postal Code]
Mailing City (Mailing) Contact: Mailing City Recipient Address [Recipient City]
Mailing State (Mailing) Contact: Mailing State Recipient Address [Recipient State]
Mailing Country (Mailing) Contact: Mailing Country Recipient Address [Recipient Country]
Email Contact Invoice: Email Contact
Account: Contact Role Invoice Contact, Dunning Contact
Email Salutation (Email) Contact: Salutation
Email First Name (Email) Contact: First Name
Email Last Name (Email) Contact: Last Name
Email (Email) Contact: Email
Email CC Invoice: Email CC
Email BCC Invoice: Email BCC

Account Statement Address Data

Field Subordinate Field Possible Data Origin Template (v1) Target
Field [Placeholder]
Billing Street Invoice: Billing Street Billing Address [Billing Street]
Billing Postal Code Invoice: Billing Postal Code Billing Address [Billing Postal Code]
Billing City Invoice: Billing City Billing Address [Billing City]
Billing State Invoice: Billing State Billing Address [Billing State]
Billing Country Invoice: Billing Country Billing Address [Billing Country]
Contact Account: Contact Role Invoice Contact
Mailing Contact Account: Contact Role Invoice Contact
Mailing Salutation Contact: Salutation
Mailing First Name Contact: First Name
Mailing Last Name Contact: Last Name
Mailing Street Contact: Mailing Street Recipient Address [Recipient Street]
Mailing Postal Code Contact: Mailing Postal Code Recipient Address [Recipient Postal Code]
Mailing City Contact: Mailing City Recipient Address [Recipient City]
Mailing State Contact: Mailing State Recipient Address [Recipient State]
Mailing Country Contact: Mailing Country Recipient Address [Recipient Country]
Email Contact Account: Contact Role Invoice Contact
Email Salutation Contact: Salutation
Email First Name Contact: First Name
Email Last Name Contact: Last Name
Email Contact: Email
Email CC
Email BCC