Salesforce integration

Overview

The Salesforce 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:

https://login.salesforce.com/packaging/installPackage.apexp?p0=04tKA000000HClD

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 

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

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: http://apisandbox.younium.com (For Production remove the word "sandbox")

 

Step 2:

After connecting to a Remote Site, you would need to create a 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.

 

Create Change Order Opportunity

On the object Younium Order there is a button "Create change order" that is used to created a Chante 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.