Install - Options

You are about to begin the 5th and final section of the Salesforce installation -- unlike the others, the sections on this page are completely optional. While the other steps must be completed in order, you DO NOT have to enable any of these settings unless you intend to use the associated functionality.

Additional Features

Multi-Currency Support

You have the ability to select a currency for each of your Chargify sites so that the proper currency reflects in your Opportunities standard and custom fields as well as the line items in the price book.

First, you must enable multi currency support in your Salesforce Org. Once enabled, multi-currency cannot be disabled in Salesforce.

Enable multi-currency in Salesforce:

  • Go to Setup > Company Profile > Company Information
  • Click Edit
  • Select Activate Multiple Currencies
  • Save

Once activated, you can manage the currencies allowed in your Org.

  • Go to Setup > Manage Currencies
  • Under “Active Currencies” select “New”
    • Select currency type
    • Enter conversion rate
    • Select decimal places
    • Save

Additional steps are required to enable multiple currency support for the API User:

  • Go to Setup > Create > Objects
  • Click Chargify Setting label
  • Click Chargify Currencies field label in the Custom Fields & Relationships section
  • Select “Set field level security”
  • Make visible for any relevant profiles (be sure to enable it for the profile assigned to the sync user that installed the package as the background jobs are assigned to this user)

To enable multi-currency for the Site Guest User which handles webhooks:

  • Go to Setup > Develop > Sites
  • Click your Site Label
  • Select Public Access Settings
  • Go to Custom Field-Level Security in the Field-Level Security section
    • Click View next to Chargify Settings
    • Edit
    • Provide Read and Edit access for Chargify Currencies
  • Save

You can now navigate to the Chargify Configuration tab in Salesforce and select the supported currency for each of the subdomains you have available in your org.

Note: Field level security should already be provided for the following objects and site guest user by default if multi currency support is enabled:

  • Products (Product2)
  • Opportunities (Opportunity)
  • Price Book Entries (PriceBookEntry)
  • Coupons (CHRGFY__Coupon__c)
  • Opportunity Products (OpportunityLineItem)
  • Product Versions (CHRGFY__Product_Version__c)
  • Price Brackets (CHRGFY__Price_Brackets__c) 

Restricted Coupons Support

Restricted coupons allow you to discount only certain products or components. If you use restricted coupons in Chargify, you will want to enable restricted coupon support in your Salesforce org as well so only certain Opportunity line items are discounted.

Without this setting enabled, the SUM of all line items in your Opportunity will be discounted by default.

Enable restricted coupons in Salesforce:

  • Go to Setup > Develop > Custom Settings
    • Select “Manage” link next to “Batch Size”
    • Choose “New” (or edit existing)
    • Select “Chargify Restricted Trigger” checkbox
    • Save

Person Account Support

This setting will allow you to create Person Accounts, which combine an Account and Contact in one. This is different from the default sync, which creates a Business Account and a Contact. Person Accounts are a good choice for businesses who work with individual customers, as opposed to companies who may have multiple contacts associated with the same account. If this functionality is enabled, all new Accounts created from Chargify will be Person Accounts.

If there are Chargify customers with existing Business Accounts, the sync will not modify the type of Account to a Person Account. Similarly, the integration will not modify any existing Person Accounts by changing them into Business Accounts.

Additionally, this setting only applies to new Chargify subscriptions that do not meet any of the matching rules you provide. As an example, let’s say the integration is configured to match subscriptions by email address and Person Account creation is enabled. If a matching email is found on a Business Account, the Opportunity will be created under the existing Business Account. A new Person Account won’t be created.

To enable integration support for Person Accounts:

  • Follow Salesforce’s guide to enable Person Accounts. Once the requirements are met, you will need to contact Salesforce support to enable Person Accounts.
  • Ensure the Person Account record type is available for all profiles that need access to its functionality. To do so, follow these steps:
    • Click on Setup
    • In the “Quick Find” box, type profile and select Profiles under Users.
    • Click on the name of a specific profile and scroll down to the section labeled “Account Record Type Defaults.”
    • Click “edit” under Person Accounts and select Person Account from the available record types.
    • Save
  • You may need to edit the Page Layout of Person Accounts to view Chargify fields. If so, follow the steps here for a Business Account but replicate the steps on a Person Account.
  • Click the checkbox for “Store Chargify Customer as Person Account” when setting up Chargify Configuration (instructions below).

Customer Hierarchies Support

Customer hierarchies allow you to group subscriptions to bill together and organize their customer records into a parent-child hierarchy. For more information about this and the new relationship invoicing architecture, please review our documentation here.

Every 30 minutes, Salesforce will check with Chargify to see if customer hierarchies have been enabled in your connected Chargify sites. If this is the case, then an uneditable checkbox will appear under the “Customer Hierarchies” section on the “Chargify Configuration” page. At this time it is not possible to turn customer hierarchies on within Salesforce – it must be enabled in the Chargify user interface.

To set up customer hierarchy support inside Salesforce:

  • Edit the Opportunity layout
    • Add the “Chargify Subscription Payer” field to indicate who is paying for this Opp
  • Edit the Account layout
    • Add the “Chargify Parent Customer” field to indicate who, if anyone, is the parent of this Account
    • Add the “Chargify Add Child” button to add a new child Account
    • Add the “Child Customers” related list to display any children of a given Account
    • Add the “Payable Subscriptions” related list to display any Opps that a given Account is paying for

There are also a couple of changes to the Opportunity that are tied to customer hierarchies. When Salesforce detects that they are enabled in Chargify, the following modifications are made to the Chargify Actions Visualforce page:

  • “Adjust Balance” and “Add One Time Charge” have been removed since these actions do not currently exist in relationship invoicing
  • “Record External Refund” and “Record Refund” have been moved to the view-only Invoices Visualforce page since they must be applied to a particular invoice. They have been combined to a single “Refund” Action on the invoice.

Please note that if you have multiple Chargify subdomains connected to Salesforce, these options will still be available for non-relationship invoicing sites.

Automatically create Chargify subscription upon Closed/Won Opportunity

Normally, the “create subscription” button on the Opportunity is required to create it within Chargify as a subscription. With this feature enabled, it’s possible to auto-create the subscription once the Opportunity’s stage is saved as closed/won. The integration will use the Product, Chargify subdomain, and Account/Contact information to create the subscription.

Please keep in mind that all the fields required for a subscription will need to be filled out in Salesforce to complete the subscription creation. Here are the minimum requirements:

  • A valid, configured Chargify subdomain must be on the Opportunity in the “Chargify Subdomain” field
  • The Opp must have an associated Account and Contact
  • The associated Contact must have an email address
  • A valid Chargify product must be on the Opportunity

It’s possible to create the subscription with the following:

  • Custom fields
    • Create them as objects in the “Chargify Subscription Custom Fields” Related List on the Opportunity
    • Enter the name of the custom field as “Chargify Subscription Custom Fields Name”
    • Enter the value of the custom field as “Value”
    • If the custom field name doesn’t currently exist on that Chargify site, a new one will be created

In order to automatically create the subscription without prompting the customer for credit card details, this setting will create all subscriptions on invoice billing to start. All attempts to create the subscription will be logged on the Opportunity for reference. Once a successful payment is made in Chargify, triggering a payment_success webhook, the subscription will be changed to automatic billing by the integration.

To automatically create closed/won Opportunities as subscriptions, please follow these steps:

  • Go to “Chargify Configuration”
  • Towards the bottom of the page, enable the checkbox for “Auto-Create Subscriptions upon ClosedWon”

  • Navigate to any Opportunity, click into it, click “Edit Layout”, and add the “Chargify Event Logs” Related List to the Opportunity layout. We recommend adding the following fields:
    • Subscription Event Name
    • Attempted At
    • Message

Additional Configurations

Disabling Individual Chargify Actions

You can enable/disable individual action buttons per user or profile:

  • Go to Setup > Develop > Custom Settings
  • Click the label “Disable Chargify Actions”
  • Select “Manage”
  • Press “New”
  • Select “User” or “Profile” from drop down
  • Click the magnifying glass and choose the user or profile
  • Enable all check boxes for the buttons you wish to disable
  • Save

You can create unique Custom Settings for multiple users or profile types by repeating the process above. Buttons will still be visible in Opportunities, but they will be greyed out and the user will be unable to select it.

Reduce the batch size during initial Subscriptions import/sync

The subscriptions import batch size is set to 200 records per batch by default. If your Salesforce Org has a lot of triggers and workflows, you may encounter COU timeout errors. To resolve these errors, you can reduce the batch size for Subscriptions from 200 to a lesser value.

  1. Go to Setup.
  2. Search Custom Settings in Quick Find Box and click Custom Settings under develop.
  3. There will be a custom setting named ‘Batch Size’, click on manage link adjacent to this custom setting.
  4. Click on New button.
  5. Then enter ‘Subscription Batch Size’ manually (max batch size can be 200 and min batch size can be 1).

Reduce the Portal batch sync

If the Portal batch sync is causing a CPU timeout, it’s possible to reduce the per-page size of the Portal batch, which is using to retrieve and update Billing Portal information from Chargify. This is done via the ‘Chargify Portal Batch Size’ setting in the ‘Batch Size’ Custom Setting.

To change the size of the Portal batch:

  1. Go to Setup.
  2. Search for ‘Custom Settings’ in the quick find box along the lefthand side and click on it.
  3. Click on the Custom Setting named ‘Batch Size’.
  4. Press the Manage button.
  5. Check if any record exists.
    • If a record exists, then edit it and change the value in “Chargify Portal Batch Size” from 0 to 50.
    • Otherwise, create the new record and modify this value from 0 to 50.
Congrats! You've reached the end of the Chargify / Salesforce integration installation.