action.skip

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

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. This is why there are several types of addresses available on the Invoice object.

Billing address
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.
Mailing address
In order to determine the postal mail recipient, JustOn provides the mailing address fields on the invoice. The mailing address data is taken from an associated contact – either via user input on manual invoice creation or automatically fetched using contact roles.
Recipient address

By default, the invoice template (v1) uses custom placeholders to fetch the mailing address data and to fill the recipient address field on invoice finalization. The placeholders fall back to billing address data 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, producing an incomplete recipient address.

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).

Shipping address
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).
Email address
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 defined for contacts when

JustOn Billing & Invoice Management supports contact roles as defined using the custom picklist field JustOn Contact Role on the Contact object and on the Account Contact Relationship object. This mechanism replaces the Account Contact Role functionality in Salesforce Classic, which is no longer supported by Salesforce.

JustOn Contact Role priority
  • If both JustOn Contact Role on the account–contact relationship and JustOn Contact Role on the contact are set, the role defined on the account–contact relationship (irrespective of whether it is a primary or secondary relation) has priority over the role defined on the contact.
  • If JustOn Contact Role is set both on a direct and an indirect account–contact relationship, the role defined on the direct account–contact relationship (primary relation) has priority over the role defined on the indirect account–contact relationship.
  • JustOn Billing & Invoice Management considers JustOn contact roles defined on primary contacts (related via a direct account–contact relationship) only.

    If you need a JustOn contact role on a secondary contact (related via an indirect account–contact relationship), you must define it on the corresponding ACR record.

  • Salesforce allows time limitations and an explicit Active status for account–contact relationships. These settings, however, do not have influence on the priority of the assigned JustOn contact roles. If an account–contact relationship is valid on a given date, JustOn Billing & Invoice Management will consider the assigned contact role.

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

  • Contact role settings on the account–contact relationship (ACR) and on the contact can complement each other, as long as they are not in conflict.

  • For compatibility reasons, JustOn Billing & Invoice Management still supports existing Salesforce Classic Account Contact Roles. If available, they take general precedence over the values set in the JustOn Contact Role fields on the contact or the account–contact relationship.

To keep control simple, use JustOn contact roles either on contacts or on account-contact relationships only. If you decide to use account-contact relationships, JustOn recommends to use JustOn contact roles on account-contact relationships for more flexibility.

The examples in JustOn Contact Role Priority illustrate the behavior.

JustOn Billing & Invoice Management 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.

Related information:

For details about enabling and defining contact roles, see Using 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 the billing address differs from the mailing address, the two given addresses are printed to the PDF.

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.

Invoice Address Data

Field Subordinate Field Possible Data Origin PDF 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
ACR: Contact Role Invoice Contact
Subscription: Contact
Mailing Contact Account: Contact
ACR: 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
ACR: 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

If account billing address data is given, even if incomplete, the account data completely overrides the invoice billing address.

Field Subordinate Field Possible Data Origin PDF Target:
Field [Placeholder]
Billing Street Account: Billing Street
Invoice: Billing Street
Billing Address [Billing Street]
Billing Postal Code Account: Billing Postal Code
Invoice: Billing Postal Code
Billing Address [Billing Postal Code]
Billing City Account: Billing City
Invoice: Billing City
Billing Address [Billing City]
Billing State Account: Billing State
Invoice: Billing State
Billing Address [Billing State]
Billing Country Account: Billing Country
Invoice: Billing Country
Billing Address [Billing Country]
Contact Invoice: Contact
ACR: Contact Role Invoice Contact, Dunning Contact
Mailing Contact Invoice: Mailing Contact
ACR: 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
ACR: 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 PDF Target:
Field [Placeholder]
Billing Street Account: Billing Street Billing Address [Billing Street]
Billing Postal Code Account: Billing Postal Code Billing Address [Billing Postal Code]
Billing City Account: Billing City Billing Address [Billing City]
Billing State Account: Billing State Billing Address [Billing State]
Billing Country Account: Billing Country Billing Address [Billing Country]
Contact ACR: Contact Role Invoice Contact
Mailing Contact ACR: 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 ACR: 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