Installation

Install the Application Package

Click on the Salesforce package link and login to the target environment and select Install for Admins Only.

Salesforce System Administrator permissions are required.

Click Install to start the installation.

2.png

Once completed, you can verify if the package is installed, by navigating to Setup > Installed Packages.

3.png

Assign Permission Sets

There are two permission sets which can be assigned.

Chargify Admin: This permission set should only be assigned to those who will modify the configuration of the integration. Chargify Admin permission set includes all of the permissions of the Chargify User, so there is no need to assign both to Admin users.
4.png

Chargify User: This permission set should be assigned to all other users of the integration.

5.png

Add Remote Site Settings for Your Chargify Sites

  1. Navigate to Setup > Remote Site Settings.

  2. For each Chargify Site you want to connect with Salesforce, create a new remote site settings record by clicking New Remote Site.

    6.png

  3. For each remote site record, populate:

    • Remote Site Name: This can be any name you wish to use.
    • Remote Site URL: This is the URL of the Chargify site. The full URL, which includes https://.
    • Active: Ensure this is selected.
  4. Once each are populated, click Save to save the settings for that remote site.

7.png

Connecting the integration to a Chargify site

  1. Login to your Salesforce environment as the Admin user (the one with Chargify Admin permission set assigned previously).

  2. Navigate to the Salesforce App Manager.
    Screen_Shot_2022-10-07_at_1.46.56_PM.png

  3. Select the Chargify app.
    If you don't see it from the dropdown you may need to select View All.
    Screen_Shot_2022-10-07_at_1.48.22_PM.png
    8.png

  4. Click the Chargify Configuration tab.

    The integration is disabled by default. You must complete the following configuration steps before enabling the integration.

    9.png

  5. Click Add New Site to add Chargify.

    10.png

  6. Enter the Chargify Site Name, which is the domain of the Chargify site.

    Only the subdomain.chargify.com will be used here. Please remove the https:// from the site.

  7. Add your API key, which is generated in the Chargify App by navigating to Config > Integrations > API Keys.

  8. Click Save.

11.png

Data Validation Report

Before configuring and turning your integration on you can run a Data Validation Report. This report will allow you to see what exactly will be matched from Chargify to Salesforce. This report can be run by clicking the “Data Validation Button” in the Chargify Configuration tab.

34.png

After the report finishes you are able to view the results by clicking the Chargify PreIntegration tab. Here you will find a breakdown of everything that currently matches between Chargify and Salesforce allowing for a better understanding of how things will be synced. This report includes Customer, Products, Components and Coupons and matches between existing Salesforce records.

35.png

Configuring data synchronization options

Please review the configuration options and make necessary changes before clicking Turn On Integration. These settings will determine sync timings as well as what is synced between Chargify and Salesforce.

A few things to note how the sync works. The batch sync setting below will determine when data is pulled by Salesforce from Chargify using our API using the batch job timing setup in configuration. Any changes in Salesforce will immediately be synced over to Chargify.

The settings are pre-configured for you, and you can keep defaults. But you do have the option to change settings to meet your workflow needs.

Batch sync timing options

In this section of the configuration you are able to change the sync timing. This timing is when Salesforce will pull new data over from Chargify.

12.png

Customer sync options

Customer Configuration settings will dictate what customer information is synced between Salesforce and Chargify. The Customer ID is required and the ultimate matching ID. First the integration is going to search for matching Customer ID, if not found then will search Reference ID, if not found, then search by email.

Of course if you opt out from matching by Reference or email, this step will be skipped. When a match using Reference or Email is found, the system populates Customer ID. From now on, the match is established and the system will not try to match by Reference or Email.

13.png

Synchronization Direction

Choose the direction of synchronization between Chargify and Salesforce. If both ways are chosen Chargify and Salesforce can be used to update Customer information and the sync will update the other apps information.

If Sync from Chargify to Salesforce is chosen any updates in Salesforce will not be synced to Chargify. Updates in Chargify will be synced to Salesforce. This setting is helpful if separate Account/Contact names are used between Salesforce and Chargify. This will prevent names and information from being overwritten in Chargify.

Scope

Choose the scope of synchronization between Chargify and Salesforce.

  • All Accounts with respective primary Contact will be synced to Chargify as a Customer. This setting will allow for Subscriptions to be created later with that information.

  • Only Accounts with Subscription will be synced. Selecting this will only synchronize Accounts that have a Subscription attached. This is helpful as only Accounts that have a customer in a Trialing or Paid subscription will be updated making it easier for users to manage customers with live subscriptions.

  • Only Accounts marked “Sync to Chargify” will be synced to Chargify (please note, that every Customer received from Chargify will be automatically marked as “Sync to Chargify”). This option is handy if Accounts/Contacts need to be selectively synced. This setting can be found when editing a Contact.

    14.png

Match Customers by:

Choose how to match Salesforce accounts and contacts with Chargify customers. Matching by customer Id is defaulted and cannot be unchecked.

  • Customer ID - the ultimate matching Id between Chargify and Salesforce. This will always be used first.

  • Reference ID - uses unique IDs used between Chargify and Salesforce to determine if the customer is already existing.

  • Emails - can also be used to match Accounts/Contacts and Customers between Chargify and Salesforce.

Match Found behavior:

  • Override all fields - default option is set to update data each time a change is identified and a match is found.

  • Populate only empty fields - when the match is found the system will populate only empty fields, leaving the existing data unchanged.

  • Do not update any information (except Customer Id) - no updates are made when a match is found. A new Account will be created in SF when there is no match found, but the updates are turned off.

No Match Found behavior:

This option determines what occurs when no Match between Chargify and Salesforce is found. Either an Account will be created if no match is found between Chargify and Salesforce or alternatively this can also be set to not create a new account.

Customer Hierarchy:

Only one option supported. Checking with will allow for Chargify customer hierarchies to be synced over.

Batch size for Customer:

Batch size for Customer. Entry value between 1-2000.

Product Catalog sync options

15.png

  • Product Sync Direction - Sync products from Chargify to Salesforce. Currently only one option is available.

  • Sync Scope - Sync all Products from Chargify to your Salesforce price book.

  • Matching options - Allows for product matching based on API Handle or Product ID. Helpful if other integrations are using another one or the other.

  • Batch size for Product - Batch size for Product. Entry value between 1-2000.

Subscription sync options

  • Sync Scope - Sync both ways - Selecting this option will allow for sync both ways.

  • Sync Scope - All subscription - When selected all subscriptions will be synced.

  • Opportunity Closed/Won option - Options for how Opportunities are handled after being Closed or Won. Create Subscription when Opportunity is Closed/Won.Block closing opportunity without Payment Method.

  • Batch size for Subscription - Batch size for Subscription. Entry value between 1-2000.

    16.png

Transactions Configuration options

  • Transactions sync status - When enabled transaction status will be displayed.
  • Transactions Sync Direction - Chargify to Salesforce.
  • Retention period in months - Maximum age of the Transactions to synchronize in months. Records older than retention period will be removed to save the cloud storage.
  • Batch size for Transactions - Batch size for Transactions. Entry value between 1-2000.
  • Transaction types - When moved into the Selected column these transactions will be displayed in Salesforce. Transactions that can be displayed are: Charge, Credit, Adjustment, Payment, Refund.

17.png

Enable the Integration

After the desired sync options are selected you can now turn on your sync. To do this click the “Turn ON integration” button to enable the integration. The status change to “ENABLED” and a “Turn OFF integration” button is now present, which can be used to disable the integration if needed.

18.png

  1. Select the timeframe in which you want incremental batch data syncs to run.

  2. Select Alternate Batch Processing when installing for testing purposes to avoid Salesforce non-production environments limitations.

  3. Click Save.

    19.png

Configure Your Salesforce Layouts

The final installation steps are to configure the layouts for your Salesforce - Chargify views by adding the Chargify action buttons and fields which you want to have in your Chargify - Salesforce integration.

The following are recommended steps, but you can decide to add or not add fields and buttons per your workflow requirements.

Setup Account Layout

  1. From the Setup screen, navigate to the Salesforce Object Manager.

    20.png

  2. Select Account and navigate to the layout configuration tool via Page Layouts > Account Layout.

  3. Create a Chargify section in the Accounts Layout.

  4. From the Fields view, click Section.

    21.png

  5. Drag the new section into the page layout and name the section "Chargify".

  6. Select and place the fields you want into the Chargify section.

    22.png

  7. Change the selection view from Fields to Buttons.

  8. Drag the Create Subscription button to Custom Buttons in the Account Details section of the layout.

    23.png

  9. Change the selection view from Buttons to Mobile & Lightning Actions.

  10. Drag the Create Subscription button to the Salesforce Mobile and Lightning Experience Actions section of the layout.

    24.png

  11. Change the selection view from Buttons to Related Lists.

  12. Drag Chargify Subscriptions to the lists section of the layout.
    Other Chargify related lists are available, which include: Chargify Invoices, Chargify Transaction, and Chargify Events.

    25.png

  13. Click Save.

    26.png

Setup Contact Layout

  1. From the Setup screen, navigate to the Salesforce Object Manager.
  2. Select Contact.
  3. Navigate to the layout configuration tool via Page Layouts > Contact Layout.
  4. Create a Chargify section in the Contact Layout.
  5. From the Fields view, click Section.
  6. Drag the new section into the page layout and name the section "Chargify".
  7. Select and place the fields you want into the Chargify section.
  8. Change the selection view from Fields to Buttons.
  9. Drag the Create Subscription button to Custom Buttons in the Contact Details section of the layout.
  10. Change the selection view from Buttons to Mobile & Lightning Actions.
  11. Drag Create Subscription to the Salesforce Mobile and Lightning Experience Actions section of the layout.
  12. Change the selection view from Mobile & Lightning Actions to Lists.
  13. Drag Chargify Subscriptions to the lists section of the layout.
  14. Click Save.

27.png

Setup Product Layout

  1. From the Setup screen, navigate to the Salesforce Object Manager .
  2. Select Product.
  3. Navigate to the layout configuration tool via Page Layouts > Product Layout.
  4. Create a Chargify section in the Product Layout.
  5. From the Fields view, click Section.
    28.png
  6. Drag the new section into the page layout and name the section "Chargify".
  7. Select and place the fields you want into the Chargify section.
  8. Change the selection view from Fields to Related Lists.
  9. Drag Chargify Subscriptions to the lists section of the layout. Other Chargify related lists are available, which include: Chargify Invoices, Chargify Transaction, and Chargify Events.
  10. Drag Chargify Subscriptions Preview to the lists section of the layout.
  11. Click Save.
  12. Next, navigate to the Object Manager > Product > Search Layouts for Salesforce Classic.
    36.png
  13. From the List View drop-down, select Edit.

  14. On the next page, move Create Coupon to the Selected Buttons field.

  15. Click Save.

37.png

Setup Opportunity Layout

  1. From the Setup screen, navigate to the Salesforce Object Manager.

  2. Select Opportunity.

  3. Navigate to the layout configuration tool via Page Layouts > Opportunity Layout.

    29.png

  4. Change the selection view from Fields to Buttons.

  5. Drag the New Subscription button to Custom Buttons in the Opportunity Detail section of the layout.

  6. Change the selection view from Buttons to Mobile & Lightning Actions.

  7. Drag New Subscription to the Salesforce Mobile and Lightning Experience Actions section of the layout.

  8. Change the selection view from Fields to Related Lists.

  9. Drag Chargify Subscriptions to the lists section of the layout.

  10. Drag Chargify Subscriptions Previews to the lists section of the layout.

  11. Click Save.

Setup Opportunity Product Layout

  1. From the Setup screen, navigate to the Salesforce Object Manager.
  2. Select Opportunity Product.
  3. Navigate to the layout configuration tool via Page Layouts > Opportunity Product Layout.
  4. Drag a new section into the page layout and name the section "Chargify".
  5. Drag the Chargify Subscription Preview field into the Opportunity Product Detail section that was just created.
  6. Click Save.

 

Setup Chargify Subscription Layout

  1. From the Setup screen, navigate to the Salesforce Object Manager.
  2. Select Chargify Subscription.
  3. Navigate to the layout configuration tool via Page Layouts > Chargify Subscription Layout.
  4. Change the selection view from Fields to Buttons.
  5. Drag the buttons names below to the Custom Button area under Chargify Subscription Detail:
    • Cancel Subscription
    • Clear Pending Cancellation
    • Give/Deduct Service Credit
    • Put On Hold
    • Reactivate Subscription
    • Record Prepayment
    • Resume
      31.png
  6. Next, add these buttons to the Salesforce Lightning view by moving the Buttons selection to Mobile and Lightning Actions.
  7. Once on this page, drag the actions below into the Salesforce Mobile and Lightning Experience Actions area:
    • Cancel Subscription
    • Clear Pending Cancellation
    • Give/Deduct Service Credit
    • Put On Hold
    • Reactivate Subscription
    • Record Prepayment
    • Resume
      32.png
  8. If you would like to view subscription component allocations and history this can be done by clicking from Mobile and Lightning Actions to Visualforce Pages.
  9. Drag a new Section onto the page and label it “Component Allocations”.
  10. Drag Chargify Components into the newly created section.
  11. Click Save.

 

Custom Offer Signup Pages

Custom Offer Signup Page is an externally available offer summary page, that can be shared with the customer for secured self-signup. The custom offer page can be accessed from Opportunity > Subscription Preview > Generate Signup Link.

Force.com Site Creation

  1. From Setup go to Sites and register a custom Force.com domain for your organization.image6.png
  2. Create a new Site.image4.png
  3. Choose Visualforce page for a home page. You can use ChargifyPublicOfferSignupPage
  4. In Site, Visualforce Pages section click edit and enable the following Visualforce pages:
    • ChargifyJSIframe
    • ChargifyPublicOfferSignupPageimage5.pngimage2.png
  5. Click Activate on the Site Details page.

Here is the full Salesforce’s guide on creating and setting up Force.com Sites:

Custom Offer Template Creation

  1. To create a template for Custom Offer Signup Pages, go to the Chargify Signup Pages tab and click New.
  2. Fill in the required fields as follows:
    image3.png
    • Chargify Signup Config Name - enter a helpful name (the name is for internal use only. The prospective subscriber won't see this on their end)
    • Force.com Site URL -  field enter the full Site URL (starting with “https://”). URL can be found in Setup > Sites: 
    •  Chargify Site Config - Field if the offer applies to only one site. Leave blank if the offer is applicable for all sites.
    • Validity in Days - You can override Validity in days number (default is 14). Value can be changed further per specific Custom Offer.
  3. Page Content Section is optional.
  4. And if you chose to show it on the offer sign-up page, fill in the Terms & Conditions field.

Custom Offer Signup Page Creation

To generate a Custom Offer Signup Page, go to Opportunity > Subscription Preview and click Generate Signup Link.

 

image1.png

Setup CPQ

These steps are required if you plan on enabling CPQ functionality in Salesforce. Once completed you will find new options in your quote configuration screen that will allow you to add subscriptions to the quote.

Add Custom Fields

  1. Go to Setup > Create > Objects > Quote Line (SBQQ__QuoteLine__c).
  2. Create a new Lookup field to the Chargify Subscription Preview object, making sure the fields are as follows:
    • Field Label: Chargify Subscription Preview
    • Field Name: Chargify_subscription_preview 

image2.png

  1. Create a new formula field and fill in the fields as follows:
    • Field Label: Chargify Subscription
    • Field Name: Chargify_subscription
    • Formula Type: Checkbox
    • Formula: NOT(ISBLANK(Chargify_subscription_preview__c))

image4.png

Create Custom Actions for CPQ

  1. Go to Setup > Create > Objects > object “Custom Action” (SBQQ__CustomAction__c).
  2. Find and edit the field “Label” (SBQQ__Label__c).
  3. Add the following three new values to the picklist:
    • New CH Subscription
    • Edit CH Subscription
    • Upgrade CH Subscription
  4. Click the Custom Actions tab.
  5. Click New Custom Action, and set up the fields as follows:
    • Name: New CH Subscription
    • Display Order: 2
    • Type: Button
    • Active: true
    • URL Target: Replace Page
    • URL: /apex/CHRGFYNG__ChargifyCPQRedirect?id={!Id}&type=create
    • Page: Quote Line Editor
    • Location: Quote
    • Action: Save and Navigate
    • Label: New CH Subscriptionimage3.png
  1. Click Save.
  2. Click New Custom Action and make sure the fields are named as follows:
    • Name: Upgrade CH Subscription
    • Display Order: 3
    • Type: Button
    • Active: true
    • URL Target: Replace Page
    • URL: /apex/CHRGFYNG__ChargifyCPQRedirect?id={!Id}&type=add
    • Page: Quote Line Editor
    • Location: Quote
    • Action: Save and Navigate
    • Label: Upgrade CH Subscription image6.png
  1. Click Save.
  2. Click New Custom Action again and make sure the fields are named as follows:
    • Name: Edit CH Subscription
    • Display Order: 1
    • Type: button
    • Active: true
    • Icon: edit
    • URL Target: Replace Page
    • URL: /apex/CHRGFYNG__ChargifyCPQRedirect?id={!Id}&type=edit&quoteid={!SBQQ__Quote__c.Id}
    • Page: Quote Line Editor
    • Location: Line
    • Label: Edit CH Subscription 

image1.png

Create Triggers

  1. Go to Setup > Create > Objects > Quote (SBQQ__Quote__c).
  2. Create new trigger, then copy and paste the code below:
    trigger ChargifyQuoteTrigger on SBQQ__Quote__c (before insert, before update, before delete, after insert, after update, after delete, after undelete) {
    	CHRGFYNG.ChargifyCPQAPI.QuoteTrigger(Trigger.operationType, Trigger.old, Trigger.new, Trigger.oldMap, Trigger.newMap);
    }
    
  3. Go to Setup > Create > Objects > Quote Line (SBQQ__QuoteLine__c).
  4. Create a new trigger, then copy and paste the code below:
    trigger ChargifyQuoteLineTrigger on SBQQ__QuoteLine__c (before insert, before update, before delete, after insert, after update, after delete, after 		undelete) { 
    CHRGFYNG.ChargifyCPQAPI.QuoteLineTrigger(Trigger.operationType,Trigger.old,Trigger.new,Trigger.oldMap,Trigger.newMap);
    }
    

Configure Quote Line Item Editor (Optional)

  1. Navigate to Setup > Installed Packages > Salesforce CPQ > Configure > Line Editor.
  2. Enable Option: Visualize Product Hierarchy.
  3. Move the product name to the top of the list.
  4. Go to Setup > Create > Objects > Quote Line (SBQQ__QuoteLine__c) > Field Set.
  5. Click Edit for the Line Editor.
  6. Move the product Code after the Product Name.
  7. Add Field Chargify Subscription.
  8. Click Save.

image5.png

Was this article helpful?
0 out of 0 found this helpful