Legacy Salesforce integration (Gen 1)

Overview

Younium provides two generations of Salesforce connectors. The first-generation (Gen 1) integration is a lightweight connector designed for basic synchronization of core objects such as Accounts, Opportunities, Renewals, Cancellations, Invoices, and Orders. It relies on credential-based authentication and offers limited monitoring capabilities. Gen 1 is now in maintenance mode — we will only provide bug fixes, with no further feature development.

The second-generation (Gen 2) integration is a robust, enterprise-grade solution built for scalability and continuous innovation. It introduces token-based authentication, easier setup, and broader integration points, including full product hierarchy (Products, Charge Plans, Charges) and financial KPIs such as CMRR, ACV, and TCV Salesforce connector 2.0. Gen 2 also includes:

  • Improved user experience: Embedded UI directly within Salesforce Opportunities.
  • Modernized codebase: 2nd-generation managed package with Lightning Web Components for field mapping.
  • Enhanced security: Stronger safeguards via generated keys.
  • Simplified management: All sync jobs fully accessible within Salesforce with centralized settings.
  • Ongoing updates: Continuous feature development to support evolving business needs

Migrating from Gen 1 to Gen 2

Since Gen 2 is a completely new type of integration, migration is not an in-place upgrade. Customers who wish to move from Gen 1 to Gen 2 should contact their Younium Customer Success Manager to initiate the process. The migration will be planned and guided to ensure smooth adoption of the new connector and its expanded functionality.


The Salesforce Gen 1 connector allows for the following integration points with Younium:

  • Synchronization of customer accounts from Salesforce to Younium
  • Transferring closed opportunities, including both new deals and change orders from Salesforce to Younium
  • Manual renewals of Subscription from Salesforce to Younium
  • Cancellation of Subscriptions from Salesforce to Younium
  • Synchronization of Subscription data from Younium to Salesforce
  • Synchronization of Invoice data from Younium to Salesforce

 

Salesforce Enterprise license is required for the Younium Integration.


Onboarding

Start by downloading our latest package for the Salesforce:

/packaging/installPackage.apexp?p0=04tKA000000HDDe 

Release notes can be found on this link: Release notes

Reproduce the following steps to complete the integration between Salesforce and Younium.

 

Step 1:

Create connected app

In Salesforce, open in Settings "Apps">"App Manager". Select "New Connected App".

Enter the basic information (Name, API Name, Contact email) with values of your choice. 

Select "Enable OAuth settings", in "Callback URL, enter:

https://api.younium.com/internal/api/salesforce/auth/callback (EU)

https://api.us.younium.com/internal/api/salesforce/auth/callback (US)

or if connecting to Younium Sandbox: 
https://api.sandbox.younium.com/internal/api/salesforce/auth/callback (EU)

https://api.us.sandbox.younium.com/internal/api/salesforce/auth/callback (US)

 

In "Selected OAuth Scopes", add the following scopes:

"Manage user data via APIs" and "Perform actions at any time". 

Make sure "Require Secret for Web Server Flow" is checked

Make sure to turn off “Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows”

Save your app and you will have access to the Consumer Key and Secret that is used when connecting to Salesforce from Younium.
 

Add remote site settings

After downloading the package, being logged in to your Salesforce environment, go to Setup -> 'Quick Find' -> Type 'Remote Site Settings'.

In Remote Site Settings, press 'New Remote Site'.

Enter the Younium environment URL that you want to connect to as "Remote Site URL". For instance: https://api.sandbox.younium.com (For Production remove the word "sandbox"). For US Younium tenants, use https://api.us.younium.com (or https://api.us.sandbox.younium.com)

 

Step 2:

Using ClientID and Secret (recommended):

  • Create a Client Id and Secret in Younium by following these steps:
    1. 1Log in to your Younium account
    2. 2Click your name in the top right corner
    3. 3Select "Privacy & Security"
    4. 4Go to "Personal Tokens" in the left panel
    5. 5Click "Generate Token"
    6. 6Enter a description (e.g., "PLG Portal")
    7. 7Click "Create"
    8. 8Copy the Client ID and Secret
    9.  
  • In Salesforce, ensure the correct setting is enabled on Setup > Custom Metadata Types > Younium Settings > Use New Auth Type. Make sure config value is "TRUE"
  • Ensure Salesforce user has the permission set "Younium Auth 2.0" assigned
  • Ensure the correct Younium environment is selected under Setup > Custom Metadata Types > Younium Settings > Younium Environment Override
  • In the Younium app in Salesforce, navigate to "Credential setup" tab and select "Update Credentials" in either Sandbox Authentication Status or Production Authentication Status, depending on what environment of Younium you are connecting to.
  • Add your Client Id and Secret and click Save.

Using user name and password (not recommended and will be discontinued):

Credentials to Younium are created using Named Credential.

In Setup -> 'Quick Find' -> 'Named Credentials' -> "New Legacy". ("New legacy is an option in the drop down for creating New named credential)

 

Here you would need to create two Named Credentials, one Called YouniumApi and the other one called YouniumLogin

Obs. The name is Case Sensitive, therefore be careful how you spell it.

 

URL for YouniumApi:

URL for YouniumLogin:

Untitled__1_.pngUntitled__2_.png

 

 

Username and Password should be the credentials used for the tenant in Younium. Make sure that you have the correct username and password or else the connection will not be successful.

 

Step 3:

Legal Entities.

You need to setup your legal entities in Salesforce and connect it to the Younium Legal Entity. 

In Salesforce press on the top left corner (as shown in the picture):

Direction_1.png

Search for 'Younium Legal Entities' -> 'New'.

Give the 'LE' a name and the ID will be found in Younium.

Being logged into Younium, press on Reports and follow the steps shown in the picture below.

legal_Entity_direction.png

 

After you've received the ID for the Legal Entity, feel free to paste it in the Legal Entity ID field in Salesforce when creating your Legal Entity.


Step 4: 

Now after successfully setting up the connector, you can continue setting up the page layouts for the Younium fields and related lists in Salesforce. There is also a ready to use Younium App in Salesforce that includes tabs and page layouts to get started quickly.


Field mappings

Customer accounts

The Accounts in Salesforce marked with a Legal entity and the checkbox "Synch to Younium" set will automatically synch with Younium. There is a trigger in Salesforce that immediately synch changes on the Account to Younium

When synching Accounts from Salesforce to Younium, the following fields are mapped: (any custo fields has been automatically created when installing the integration package)

Salesforce Younium Comment
Name Name  
Id Salesforce Id and ExternalCRMId  
Currency Currency  
ElectronicInvoiceAddress E-invoice address  
Your reference Your reference  
Our reference Our reference  
Tax registration number Tax registration number  
Organization number Organization number  
Invoice email Invoice email  
Invoice CC email Invoice CC email  
Tax template Tax template  
Invoice template Invoice template  
Payment term Payment term  
Invoice delivery method Invoice delivery method  
Accounts receivable account Accounts receivable account  
ExternalERPId ExternalERPId  
Billing address Default Invoice address  
Shipping address Default delivery address  

 

Product export

Younium Salesforce Comment
Charge name Name  
Product Name Younium__Y_Younium_Product_name__c  
Product Id Younium__Y_Younium_Product_ID__c  
Charge Name Younium__Y_Younium_Charge_name__c  
Charge Id Younium__Y_Younium_Charge_ID__c  
Charge type Younium__Y_Charge_type__c  
Billing period Younium__Y_Billing_period__c  
Price period Younium__Y_Price_period__c  
Charge model Younium__Charge_model__c  
Charge plan name Younium__Y_Younium_Charge_plan_name__c  
Charge plan Id Younium__Y_Younium_Charge_plan_ID__c  
True if charge model is Tiered Younium__Y_Tiered_Pricing__c  
True if charge model is Volume Younium__Y_Volume_Pricing__c  
Unit of measure Display name Younium__Unit_Of_Measure__c  
Product Legal entity Younium__Legal_entity__c  
True if Product or Charge plan has an End of sales date in the past IsActive  

 

Tiered pricing for product export

If charge in Younium has charge model Tiered or Volume pricing, the pricing tiers are created in Salesforce in the custom object Younium__Y_VolumeTiered_Pricing__c with the following mapping

Younium Salesforce Comment
  Younium__Description__c  
  Younium__Y_Younium_Product_name__c  
From Quantity Younium__Minimum_Qty__c  
To Quantity Younium__Maximum_Qty__c  
Price Younium__Price__c  
Price base (Flat/Per unit) Younium__Price_Base__c  
List price Younium__List_Price__c  
Reference to Salesforce Product Younium__Product__c  
N/A Younium__Quantity__c  
Currency CurrencyIsoCode  
Tier number (0, 1, 2, ..) Younium__Tier__c  

 

 

By default the products creates Pricebook entries in the pricebook called "Younium-[Legal entity name]. This can be customized by setting a custom pricebook on the product in Younium. More information further down in this article under Synchronization of product prices to custom pricebooks".


Closed opportunities

Closed opportunities can be synched to Younium as new or change order by either using the flow button "Send to Younium" on the Opportunity or automatically by using the invocable action "Send to Younium (V2)" that can be used in flows.

The following fields are mapped from Opportunity in Salesforce to Order in Younium:

Salesforce Younium Comment
Account Account  
Invoice account Invoice account If empty Account is mapped
Buyer reference Buyer reference  
Change type   New Order or Change, defines what operation to perform in the integration
Currency code Currency code  
Subscription type Subscription type  
Auto renewal Auto renewal  
Effective start date Effective start date Only for new orders
Effective change date Effective change date Only for change orders
Initial term Initial term  
Notice period Notice period  
Renewal term Renewal term  
Your reference Your reference  
Our reference Our reference  
Your order number Your order number  
Order date Order date  

 

The following fields are mapped from Opportunity line items in Salesforce to Order products/charges in Younium:

Salesforce Younium Comment
Younium charge name Charge name  
Unit of measure Unit of measure  
Quantity Quantity  
Charge type Charge type  
Model Model  
Start on Start on  
Effective start date Effective start date  
End on End on  
Effective end date Effective end date  
Price period Price period  
Billing period Billing period  
Remarks Remarks  
UnitPrice Price  
List price List price The standard Salesforce list price field is mapped to Younium
Discount Discount % Calculated bases on the UnitPrice and List price above

Tiered and volume pricing are supported; the pricing tiers are stored in a custom object in Salesforce linked to the opportunity line item.


Custom field mapping

You can also add your own Custom Fields in Younium and map them to your own Custom Field in Salesforce.

Custom field mapping is done in Salesforce under Settings > Custom metadata types

Click "Manage records"

mceclip0.png

Then you see a page with configuration parameters for the integration. The field mappings are tagged with the field "Setting type" = "Field mapping".

mceclip2.png

To create a new mapping, select "New". To edit an existing mapping, click "Edit" on the corresponding line". This will open the configuration record:

mceclip1.png

Label: Use anything you want to describe the mapping

Younium setting name: Use anything you want to describe the mapping

Younium field: The custom field "key" in Younium

Saleforce field: The API name of the field in Salesforce

Setting type: "Field mapping"

Legal entity: Leave blank

Config value: Leave blank

Younium object: What object is the mapping for, available options:

  • Account: Mapping a field in the synch of Accounts from Salesforce to Younium
  • Order: Mapping a field from the Salesforce Opportunity to Younium Order in the synch from Salesforce to Younium
  • Order charge:Mapping a field from the Salesforce Opportunity Product to Younium Order product charge in the synch from Salesforce to Younium
  • Younium Order: Mapping a field from Younium Order to Salesforce Younium Order object in the synch from Younium to Salesforce
  • Younium Order charge: Mapping a field from Younium Order Product charge to Salesforce Younium Order charge object in the synch from Younium to Salesforce

Synchronization of product prices to custom pricebooks

By default, Younium synchronized products and prices to Salesforce into a pricebook named "Younium - [Legal entity name]". It is however possible to customize what pricebook a certain product should be synched to.

Step 1: Synchronize the pricebooks to Younium custom field list. Do this by browsing to Settings > Integrations > Salesforce and check Pricebook and click Synchronize.

Step 2: Make sure there is a custom field on "Charge" for the Pricebook configuration. Verify that this custom field is created in your Younium legal entity, if not create it. Make sure key is exactly "integrationSalesforcePricebook".

mceclip0.png

Step 3: Go to the product charges in Younium and set the pricebook you wish to use. 

After this is done, notice that your products are synched to the configured products.


Working with shared products

In Younium you can configure product sharing, which means that products are defined in one legal entity (normally a "group company") but are also available in other legal entities ("child companies"). This is explained here: https://support.younium.com/hc/en-us/articles/360038782551-Product-Structure#h_01JK5A3EABXB9BHHZ4KXWWC9FX 

These shared products can also be synced to Salesforce and used by the Younium integration. To fulfil this, it is required to enable the Salesforce integration in both the company owning the product and in the individual child companies. When exporting products to Salesforce the product will be created once it is exported in the company owning the product. When exporting products in the child companies, only pricebookentries will be created. 

Example: "Group company" owns the product, and it is shared with "Company A", "Company B", and "Company C".

Exporting products in "Group company" will create the product in Salesforce and create pricebookentries in the standard pricebook and pricebook "Younium - Group company".

Exporting products in "Company A", "Company B", and "Company C" will create pricebookentries in pricebooks "Younium - Company A", "Younium - Company B", and "Younium - Company C".


Create Change Order Opportunity

On the object Younium Order there is a button "Create change order" that is used to created a Change Order opportunity that is linked to the existing Subscription. When creating the Opportunity, you can chose what current order products to bring along to the new Opportunity.

When creating the new Opportunity, the following data are mapped:

Younium Order Opportunity
Pricebook field on Younium Order, if empty it takes the first pricebook linked to the legal entity of the Order Pricebook
Account Account
Selected when creating the Opportunity Close date
Selected when creating the Opportunity Stage
Selected when creating the Opportunity Effective change date
Selected when creating the Opportunity Name
Auto renewal Auto renewal
Currency Currency
"Change Order" Younium Order type
Younium Order number Younium Order number
Younium Order Id Younium Order Id

 

Younium Order charges Opportunity line items
"Change" Younium type
Younium__SF_Prod_ID__c Product
Billing period Billing period
Order product number Order product number
Order charge number Order charge number
Price UnitPrice
Quantity Quantity
Price period Price period
Charge name Charge name
Charge model Charge model

Customizing Opportunity Product selector

It is possible to customize the tables in the Product selector that is used on Opportunities.

The tables "Product picker charge table" and "Product picker existing table" are configured separately. The latter is the bottom table that lists the saved opportunity products whereas the "Product picker charge table" configures the table that is visible when you add new products to the opportunity.

Configuration is made in Settings > Build > Develop > Custom metadata types. You find here the Custom metadata type "Younium table column". 

 

The records have settings for Label, Width, Read only, Sort order and Active column. The field "Field name" defines the field name from Opportunity Line items. You can add new records to the Custom metadata type if you want to add your own custom columns in the table.


Make products hidden for users in Salesforce product selector

To hide a charge from users in the Younium product selector drop downs, the "Hide from Younium Product Selector" checkbox on PriceBookEntry can be used. If this is checked, the charge is not visible in the product selector. The charge can still be used on change order opportunities that are created from the subscription.

If the charge should also not be available in change order opportunities, the product in Salesforce can be made inactive by using the standard "Active" checkbox.


FAQ

The following error messages can be thrown in the error log when exporting Orders and Order charges to Salesforce:

Invalid cross reference id

This error is when Younium holds a Salesforce Id that does not exist in Salesforce, most likely because it has been deleted. To solve this you need to delete the Salesforce Id from the Order or Order charge in Younium.


Required fields missing

If you get this field on the export of Order charges then the issue is likely that the Order itself has not been able to synch to Salesforce. Check if there is a problem with the Accounts and trigger a synch of the Order again. To be sure you can make an edit and save on the Order record to make sure it will be captured in the next synch job to Salesforce.


Release notes

(1.576)
  • map unit of measure from order charge to opportunity product on change order creation

/packaging/installPackage.apexp?p0=04tKA000000HDDe

 
(1.575)
  • Fix error when seding non-tiered product to Younium

/packaging/installPackage.apexp?p0=04tKA000000HDDZ

 
(1.574)
  • Fix issue when using new Auth method.
  • Fix issue where the connector sent the standard List Price instead of the Younium List Price, causing an incorrect List Price to be sent to younium.

/packaging/installPackage.apexp?p0=04tKA000000HDDP

 
(1.572)
  • Support more decimals when editing charge tiers

/packaging/installPackage.apexp?p0=04tKA000000HDBO

 
(1.571)
  • Enable more decimals when editing existing OLIs.

/packaging/installPackage.apexp?p0=04tKA000000HDAp

 

(1.570)

Enable more decimals when typing currency in product selector
/packaging/installPackage.apexp?p0=04tKA000000HD5t

(1.566)

Smaller bug fixes

Install URL: /packaging/installPackage.apexp?p0=04tKA000000HCtW

 

(1.563)

Bug fix related to new authentication method, solves error message "Attempt to de-reference null object"

Install URL: /packaging/installPackage.apexp?p0=04tKA000000HCrG

 

(1.562)

Sales orders

  • It is now possible to create Orders of type Sales Orders (instead of Subscription) from Salesforce. This is done by setting the field "Order mode" on the Opportunity to Sales order. A Sales order can only have one-off fees and no recurring charges.

Product selector

  • The Younium product selector in Saleforce has now searchable fields instead of the classic drop downs. This provides a better user interface specially when having a high number of products.
  • Product selector has increased usability when using narrow screens.

Miscellaneous updates

Install URL: /packaging/installPackage.apexp?p0=04tKA000000HCmk

 

(1.561)

Miscellaneous updates

  • Improved error handling for change order opportunity creation.
  • Improved TCV calculations for certain change-order scenarios.
  • Include pricing tiers when creating change order opportunity.

Install URL:/packaging/installPackage.apexp?p0=04tKA000000HClD

 

(1.560)

Miscellaneous updates

  • Synchs Invoice account from Younium to Salesforce on Younium Order object
  • Sends Invoice Accounts to Younium on Change Order (if Invoice Account is not null)
  • Sends Auto Renewal-flag to Younium on Change Order (if custom metadata setting "Sync_Auto_Renewal_In_Change_Order" is set to TRUE)

Install URL: /packaging/installPackage.apexp?p0=04t69000001WiwP 

 

(1.559)

Fix of identified issues

  • Fixed breaking issue in the change order creation logic.
  • Shows error messages to users in change order creation component

Install URL: /packaging/installPackage.apexp?p0=04t69000001WiwK

 

(1.557)

Mapping Charge type when creating change order opportunity

It was reported from customers that charge type was not mapped from Younium Order charge to Opportunity line item when creating change order opportunity. This has now been fixed.

 

(1.556)

Miscellaneous fixes

  • Error handling when sending orders to Younium
  • Using fixed percentage in product selector
  • Show change/start date in product selector depending on order type
  • Add lookup from change Opportunity Product to the corresponding Charge

 

(1.555)

Added standard fields to Younium Order and Order charges

We have added field "Our reference" to Younium Order object and field "ACV Currency" to Younium Order charge object.

(1.551)

Customize the Opportunity products table in Product selector

With this update it is possible to customize the columns in the sub table "Opportunity products" in the Younium Product selector. This is done in Custom metadata type "Younium table columns" using the filter "Product picker existing table". To enable this it is also required to update the setting "Use old opportunity product table" to FALSE in Custom metadata type "Younium setting".

(1.544)

Renew and Change operation from an Opportunity

It is now possible to have an Opportunity that when it's closed won and synched to Younium both Renew and change the Subscription for its upcoming term. This is done by using the field "Next renewal term (months)" on the Opportunity.

 

(1.541)

Younium App

The package now includes an App "Younium" that includes tabs for all relevant objects for the Younium Integration. The package also includes a set of Page layouts that are prepared with the Younium fields.

 

(1.539)

Logging

With this version a new Younium Log object is introduced in Salesforce. This is used to log any failed outgoing api requests. 

 

September 2023 (1.538)

Edit tiers on saved opportunity products

Pricing tiers on already saved opportunity products are now editable using the "Edit tiers" button on the line items in the Younium product selector.

 

Configurable dialog for Creating change order opportunities

There is now a new dialog available that can be added using a new action button on Younium Orders. This is a configurable dialog where it's possible to customise what fields are available for the user when creating the opportunity. Fields are configured in "Customer metadata types" in Salesforce.

In the new dialog the user can select what existing products to bring in to the Change order opportunity. 

 

Fixed bug with currency symbol in Product selector

A bug that always presented the home currency in the product selector independent of the opportunity currency.

 

TCV calculation for all price periods

The TCV calculation on opportunity products now supports also monthly and quarterly price period configurations.

 

Download Invoice PDF from Younium

There is a button you can add to page layouts for the Younium Invoices object that downloads the invoice pdf and attaches it to the invoice record in Salesforce.

 

June 2023 (1.534)

Lock tiers in Product selector

There is now a setting that makes it possible to make the tiers read-only in product selector, this means that the user can only change price, not change quantity levels or add additional tiers. This is a setting on Product with the checkbox: "Tiers locked in Product picker".

 

April 2023 

Support for Tiered and Volume pricing

The new object Younium Volume/Tiered pricing is fully introduced and supports Tiered and Volume price models on Opportunity products. It is also used in the synch of Subscriptions from Younium to Salesforce.

 

Mapping of Online payment details 

It is now possible to map online payment details (Stripe customer ID and Tokens) from Salesforce to Younium in the account synch.

 

Show effective start date on Product selector

It is possible to add the Opportuntiy (Order) effective start date to the Product selector. This is done in Custom metadata types with the parameter "Show_EffectiveStartDate".

 

March 2023 

Fully configurable columns in Product selector

In Custom metadata types: Younium table columns, it is now fully configurable what columns to display in the Younium product selector on Opportunity. This includes the possibility to display any field on opportunity products, including custom fields.

 

Invocable action to send Opportunity to Younium

The synch of opportunity to Younium is now available as an invocable action in Salesforce, this means that it can be triggered automatically with a flow for example when an opportunity is Closed Won.