Integrate SalesForce
Overview
Integrate Salesforce with 2Checkout to ensure that data on orders your shoppers place through the 2Checkout platform is readily available in your Salesforce account. You can push not only order data but also additional information such as customer and subscription info, based on a range of triggers that you control. You can then employ Salesforce capabilities to manage order data extracted from the 2Checkout platform.
Availability
The Salesforce connector is available as an add-on. Contact 2Checkout for more information.
- Standard - 2Checkout pushes data into Salesforce for a static collection of objects/fields.
- Custom - 2Checkout provides support and works closely with you to define custom integrations, providing you will full control over where and how the order data is pushed into your Salesforce account.
Requirements
All requirements listed in this section are mandatory.
Match product codes across platforms
Enter Product codes when first creating products in Salesforce. In addition, editing existing products will allow you to also change product codes Make sure the product codes of items configured in the 2Checkout Control Panel are identical to the product codes of the matching items in Salesforce.
Advanced integration for bundle products
The Salesforce connector supports bundled products. 2Checkout - Salesforce integrations reflect bundle sales, but also break down bundles and report order data for each product actually reaching customers.
Price and tax data is provided only for the bundle. Products sold as a part of bundle offerings feature 0 (zero) prices and taxes.
2Checkout Price Book
A Price Book with the name Avangate is required in Salesforce for the integration to work. All products in Salesforce that mirror those configured in the 2Checkout platform should be added to the Avangate Price Book.
For 2Checkout products with base price use the value of the Default price. For 2Checkout products without base price, use the value of the first price interval, or set it to 0 (zero).
Multi-currency support
The Salesforce connector supports multiple currencies for the data extracted from the 2Checkout system and sent into Salesforce. The capability enables you to match the currencies of your sales through 2Checkout with the currencies in Salesforce.
To create a custom price book, follow these steps:
- Login into the Salesforce platform.
- Navigate to Products, and in the Maintenance section at the bottom of the Products home page, click Manage Price Books.
- Select New, and enter the details of the price book, such as a name and a description (optional).
- Check Active and then click Save.
You are required to configure product prices in all currencies for the markets you're selling into, and not only for USD.
The Connector will only push your sales data into Salesforce for the products that have a price defined in the same currencies as available in the 2Checkout platform.
For example, if you configured the price of Product A as $99.99 for the US and 88.99 EUR for Europe, but only defined $99.99 in Salesforce, data for sales in EUR will not be uploaded to Salesforce. The Connector will not convert sales for sales in currencies that you haven't defined in Salesforce.
2Checkout user privileges
Access to the Salesforce connector in the 2Checkout Control Panel is only available to users with the necessary privileges. To enable access to the connector, click on Account settings, then on the Manage user access button in the User access, identify the user which you will grant Salesforce integration privileges and edit the assigned role. Check the Salesforce integration option under Setup to enable access to the Salesforce connector for a specific user.
Salesforce account
Use a Salesforce Enterprise, Developer or Unlimited account.
Salesforce user privileges
To use the Salesforce integration provided by 2Checkout, it's mandatory that you provide valid Salesforce.com account information for a user with Salesforce API privileges.
When the 2Checkout connector creates custom fields in Salesforce, it enables view/read privileges only for Admin (System Administrator) and Standard (Standard User) profiles.
Required: To make sure your Salesforce user has view/read privileges for the 2Checkout custom fields:
- Assign the Admin or Standard roles to the Salesforce user you utilize with the 2Checkout Salesforce connector, or,
- Enable view and read privileges manually for all 2Checkout custom fields in your account for your Salesforce user.
Without these privileges, custom fields will not be accessible when using the Salesforce API with your credentials, and will not be included in the WSDL.
IP addresses for 2Checkout services
2Checkout is using the following IP networks, which need to be set as allowed in your firewalls in order to connect or receive connections from 2Checkout:
- 80.84.242.0/24
- 91.220.121.0/25
- 5.35.210.128/25
- 184.106.7.192/29
- 85.17.14.128/27
Enable the integration
Once you're done with the configuration requirements above you need to enable integration to have 2Checkout push order and subscription data into your Salesforce account.
Select 'No' at any time to pause integration and temporarily stop 2Checkout account details from reaching Salesforce.
2Checkout pushes order and subscription data into your Salesforce account only while the integration is enabled. 2Checkout does not transfer data for intervals of time when you disable the integration, however, the system queues the data and starts pushing it into your Salesforce account once you re-enable the connection beginning with the information logged after you disabled integration.
Integration data
By default the Salesforce connector pushes data for:
- Finished and Refunded 2Checkout orders.
- Created and Renewed subscriptions.
Salesforce integrates refunded orders in the same manner as handled by the 2Checkout system. For each refund, the 2Checkout system generates a new order with a negative value, representing the funds paid back to the shopper.
2Checkout order data is pushed into your Salesforce account at one-minute intervals but it might take a few minutes before the details are available.
Integration data triggers
Select the events for which 2Checkout pushes order and subscription data into your Salesforce account. 2Checkout is pushing data for at least the default triggers (marked in bold below).
Order triggers | Subscription triggers |
---|---|
|
|
Test orders
The 2Checkout Salesforce integration supports test orders as long as you enabled the test order system.
2Checkout and Salesforce equivalents
Essentially, the details of the order pushed into Salesforce by the connector are part of the information available for exporting either as CSV (Comma Separated Values) or XLS (Excel Format) in Order search under the Orders & customers area of the 2Checkout Control Panel. The table below outlines the equivalents between the 2Checkout platform and Salesforce. 2Checkout orders will be available as Salesforce opportunities once the connector is set up and starts pushing the data.
2Checkout |
Salesforce |
---|---|
Order |
Opportunity |
Order line |
Opportunity Line Item |
Order/Subscription billing details |
Account |
Order delivery/fulfillment details |
Contact |
Products |
Product |
Product prices |
Price books |
Subscription |
Licence |
Setup
Access the Salesforce connector administration area by navigating to Salesforce integration under Setup.
Setup requirements
- A valid Salesforce account for a user with privileges to use the Salesforce API.
- Access to the Salesforce API requires the security token generated by Salesforce and associated with the username only when your Salesforce account also requires one. To get your security token, login into the Salesforce platform, click on your name, and in the left-hand side pane, under Personal Setup, expand My personal information, and click on Reset My Security Token. You'll receive the new security token via email.
- The Enterprise WSDL file describing the structure of the application on Salesforce. Note: The Enterprise WSDL file needs to be downloaded and re-uploaded into the 2Checkout Salesforce connector the first when changes are operated to the structure of the application on Salesforce. To download an enterprise WSDL file, login into Salesforce, open the drop-down button for Your Name, select Setup and in the left-hand side pane, under App Setup, click on Develop and then API. Click the Generate Enterprise WSDL link, and right-click the document displayed and choose Save as. When you have managed packages installed, you'll first need to select the Package Version for each of your installed managed packages. After clicking Generate Enterprise WSDL and then, on the next screen, hit Generate.
- The Metadata WSDL file associated with the Salesforce account designed to allow the modification of the structure of the Salesforce objects and fields through the API. This Metadata WSDL file is needed only in standard integration scenarios with Salesforce. To download a metadata WSDL file, open the drop-down button for Your Name, select Setup and in the left-hand side pane, under App Setup, click on Develop and then API. Click the Generate Metadata WSDL link, and right-click the document displayed and choose Save as. When you have managed packages installed, you'll first need to select the Package Version for each of your installed managed packages. After clicking Generate Enterprise WSDL and then, on the next screen, hit Generate.
Configuration
Once you have the credentials for a Salesforce account for a user with API rights, the associated security token, and the Enterprise and Metadata WSDL files, you can start setting up the connector.
- Enter the username and password for your Salesforce account.
- Provide the security token.
- Upload the Enterprise and Metadata WSDL files.
- Click Continue to have the 2Checkout system check whether it can establish a connection with Salesforce or not. The 2Checkout system validates all items provided, as they are used to connect to your Salesforce account.
- A warning will be displayed if the validation fails. In such a case please check that all the details provided are correct. Also, verify that the Enterprise and Metadata WSDL files are the same as the latest versions available through Salesforce. Make sure that the Salesforce credentials you're providing are associated with a Salesforce user with API privileges.
- When first setting up the 2Checkout - Salesforce integration you will be presented with a warning message informing you of the changes that the connector is designed to make to the structure of the application of Salesforce. The Salesforce connector creates a new object named License, and also adds a number of fields to existing objects. The new objects and fields are all necessary for standard integrations to order data from the 2Checkout system into Salesforce.
- When you meet all requirements, 2Checkout saves the information.
The integration is limited to sending order data from the 2Checkout system only in the custom fields that it creates during the setup process. Note: order data is also pushed into required fields for Salesforce objects, and into the following standard Salesforce fields: Billing/Delivery address fields under Account as well as Billing/Mailing address fields under Contact. When the 2Checkout connector creates custom fields in Salesforce, it enables view/read privileges only for Admin (System Administrator) and Standard (Standard User) profiles.
Required: To make sure your Salesforce user has view/read privileges for the 2Checkout custom fields:
1. Assign the Admin or Standard roles to the Salesforce user you utilize with the 2Checkout Salesforce connector, or,
2. Enable view and read privileges manually for all 2Checkout custom fields in your account for your Salesforce user.
Without these privileges, custom fields will not be accessible when using the Salesforce API with your credentials, and will not be included in the WSDL.
Salesforce connector custom fields
All custom fields created by the Salesforce connector are labeled with the Avangate prefix as in the following example: Avangate_FieldName__c.
The following list provides additional details about the custom object and fields created by the 2Checkout Salesforce connector, all of which can also be created manually:
Account |
|
---|---|
Avangate_Record__c
|
Avangate_Company__c
|
Avangate_Email__c
|
Avangate_VAT_Id__c
|
Contact |
---|
Avangate_Record__c
|
Opportunity |
|
---|---|
Avangate_Record__c
|
Avangate_Payment_Method__c
|
Avangate_Approval_Status__c
|
Avangate_Order_Date__c
|
Avangate_Order_Status__c
|
Avangate_Order_Finish_Date__c
|
Avangate_Order_No__c
|
Avangate_Total_Price__c
|
Avangate_Reference_No__c
|
Avangate_Currency__c
|
OpportunityLineItem |
|
---|---|
Avangate_Record__c
|
Avangate_Currency__c
|
Avangate_Unit_Price__c
|
Avangate_Total_VAT__c
|
Avangate_Unit_Discount__c
|
Avangate_Pricing_Options_Names__c
|
Avangate_SKU__c
|
Avangate_Pricing_Options_Values__c
|
Avangate_Promotion_Coupon__c
|
Avangate_Licence_Codes__c
|
Avangate_Total_Without_VAT__c
|
Avangate_Licence__c |
|
---|---|
Avangate_Record__c
|
Avangate_Renewal_Status__c
|
Avangate_Purchase_Date__c
|
Avangate_Renewal_Interval__c
|
Avangate_Expiration_Date__c
|
Avangate_Disabled__c
|
Avangate_Registration_Date__c
|
Avangate_Trial__c
|
Avangate_License_Type__c
|
Avangate_Lifetime__c
|
Avangate_Licence_Code__c
|
Avangate_Opportunity__c
|
Avangate_Delivered_Codes__c
|
Avangate_Account__c
|
Activate the 2Checkout Salesforce integration
After the initial successful setup, the status of the connection to Salesforce is Inactive. You need to manually activate the integration for the 2Checkout system to start sending order data into Salesforce.
Activation requirements
Before activating the integration, you will need to re-download the Enterprise WSDL file and re-upload it via the Salesforce connector. This is necessary because the setup process changed the Salesforce structure, and the connector needs the most recent version of the WSDL, describing the updated Salesforce structure for your account for 2Checkout order data to be pushed correctly into the required and custom fields.
Important! Before uploading the WSDL, make sure that the custom 2Checkout fields were created and are included in the WSDL. If not, check your account privileges to make sure you have view/read privileges for the custom 2Checkout fields and re-download and re-upload the WSDL.
Data connection
2Checkout order data integration into Salesforce starts immediately after the connection configured with the Salesforce connector is activated. This date does not change, even if you disable and re-enable the connection. The Salesforce connector pushes all data for finished orders in the 2Checkout system into Salesforce from the moment of the initial activation.
What happens if I deactivate the connection?
If the connection is deactivated and then re-enabled, the connector will also push the data from the interval when the connection was disabled.
How often is the data pushed into Salesforce?
Once the connection is live, the 2Checkout system runs at periodic intervals and checks for order data that needs to be pushed into Salesforce. Details for any new finished and refunded orders identified are then transmitted and made available into Salesforce.
What happens in the case of configuration issues?
Be advised, all products need to be correctly configured in Salesforce to mirror their 2Checkout system configurations, namely share identical product codes, and be grouped into the Avangate Price Book. At the same time, orders containing products not defined in Salesforce at all will be ignored by the Salesforce connector. If a single product from an order is configured incorrectly, the Salesforce connector will not push the data for that order into Salesforce. Contact 2Checkout support directly if you notice discrepancies and follow the guidance provided to resolve product configuration issues. Once you deal with the problem, the Salesforce connector will try to push all order data into Salesforce, including details it was previously unable to integrate.
Data flow
- Create a new Account for orders with new billing details, or update an existing Account if the same billing details were already used in the past. The billing details are extracted from the subscription information for end-users and from the sale information for partners. Accounts are tied to the email address shoppers and partners use to place orders.
- Create a new Contact for orders with new delivery details, or update an existing Contact if the same delivery details were already used in the past. Multiple Contacts can be linked to a single Account. Contacts can share the same delivery email address, but be different from one another if they don't also share the contact full name (first name and last name).
- The Salesforce connector will now push the order data and create a new Opportunity using the information taken from the order. Opportunities are automatically linked to Account and Contact entries.
- Create a new Opportunity Line Item using the information taken from the order lines. A new line item is created for each product included in an order, containing all subscription codes/keys generated for that product. Order lines are linked to previously created opportunities with the product featured in each opportunity line item being linked to the correspondent Avangate Price Book entry defined in Salesforce.
- A new License entry is created for each generated subscription code, and linked to the corresponding opportunity.
- Existing Subscriptions will only be updated when new orders are placed referencing the same subscription code, such as in the case of subscription renewals or upgrades, for example.
Avangate data and Salesforce fields
The Avangate data is mapped into Salesforce in the following fields:
Account |
||
---|---|---|
Name: |
BillingCompany / BillingFirstName + BillingLastName | |
Avangate_Record__c: |
Checked for orders pushed by Avangate |
|
Avangate_Email__c: |
BillingEmail |
|
Phone: |
BillingPhone |
|
BillingStreet: |
BillingAddress |
|
BillingCity: |
BillingCity |
|
BillingState: |
BillingState |
|
BillingCountry: |
BillingCountry |
|
BillingPostalCode: |
BillingZip |
|
ShippingStreet: |
DeliveryAddress |
|
ShippingCity: |
DeliveryCity |
|
ShippingState: |
DeliveryState |
|
ShippingCountry: |
DeliveryCountry |
|
ShippingPostalCode: |
DeliveryZip |
|
Type: |
Shopper type - end user or partner |
|
Avangate_Company__c: |
BillingCompany |
|
Avangate_VAT_Id__c: |
BillingVATId |
Contact |
|
---|---|
Avangate_Record__c: |
IsAvangateOrder |
FirstName: |
BillingFirstName |
LastName: |
BillingLastName |
Phone: |
BillingPhone |
Email: |
BillingEmail |
MailingStreet: |
BillingAddress |
MailingCity: |
BillingCity |
MailingState: |
BillingState |
MailingCountry: |
BillingCountry |
MailingPostalCode: |
BillingZip |
OtherStreet: |
DeliveryAddress |
OtherCity: |
DeliveryCity |
OtherState: |
DeliveryState |
OtherCountry: |
DeliveryCountry |
OtherPostalCode: |
DeliveryZip |
Opportunity |
|
---|---|
Avangate_Record__c: |
IsAvangateOrder |
Avangate_Approval_Status__c: |
Approval status |
CloseDate: |
OrderCompleteDate |
Avangate_Order_Status__c: |
Order status |
Avangate_Order_No__c: |
OrderNumber |
Avangate_Reference_No__c: |
OrderRefferenceNumber |
Avangate_Payment_Method__c: |
OrderPaymentMethod |
Avangate_Order_Date__c: |
OrderDate |
Avangate_Order_Finish_Date__c: |
OrderCompleteDate |
Avangate_Total_Price__c: |
TotalPrice |
Avangate_Currency__c: |
PaymentCurrency |
StageName: |
OrderApprovalStatus |
OpportunityLineItem |
|
---|---|
Avangate_Record__c: |
IsAvangateOrder |
Quantity: |
Quantity |
Description: |
Info |
Avangate_Currency__c: |
Currency |
TotalPrice: |
Avangate_Total_Without_VAT__c + Avangate_Total_VAT__c - Avangate_Unit_Discount__c * Quantity |
Avangate_Unit_Price__c: |
Price |
Avangate_Unit_Discount__c: |
Discount |
Avangate_SKU__c: |
SKU |
Avangate_Promotion_Coupon__c: |
PromotionCoupon |
Avangate_Total_Without_VAT__c: |
TotalWithoutVAT |
Avangate_Total_VAT__c: |
TotalVAT |
Avangate_Pricing_Options_Names__c: |
PricingOptionsText |
Avangate_Pricing_Options_Values__c: |
PricingOptionsValue |
Avangate_Licence_Codes__c: |
Purchased licence codes |
License |
|
---|---|
Avangate_Record__c: |
IsAvangateOrder |
Avangate_Purchase_Date__c: |
PurchaseDateTime |
Avangate_Expiration_Date__c: |
ExpirationDateTime |
Avangate_Registration_Date__c: |
DateRegistered |
Avangate_Renewal_Status__c: |
Auto|Manual|N/A |
Avangate_Renewal_Interval__c: |
Product renewal interval |
Avangate_Disabled__c: |
Disabled |
Avangate_Trial__c: |
Trial |
Avangate_Lifetime__c: |
Lifetime |
Avangate_Licence_Code__c: |
LicenceCode |
Name: |
LicenceCode |
Avangate_Delivered_Codes__c | Ativation codes delivered for the license/subscription |
Avangate_Account__c | Link to end user data when the license is purchased through a partner company |
Re-activating the 2Checkout Salesforce connection
You have the option of deactivating the 2Checkout Salesforce connection at any time, but the integration can also be automatically deactivated by the system for reasons such as the modification of the password used for the Salesforce account set up in the connector or the resetting of the security token.
Another example of an issue that can cause the automatic deactivation of the connection is related to the Enterprise WSDL file becoming outdated due to changes operated to Salesforce objects/fields. The connection can also be dropped if the fields/objects required by the 2Checkout system for the integration are missing.
In such scenarios click the Fix account setup button and go through the steps of the setup process again, making sure that the username and password are correct, that the security token is valid, that the latest Enterprise and Metadata WSDL files are provided, and that the Salesforce user-provided has API privileges.
Note: Every time the connection is automatically deactivated, you will receive an email notification, and need to take action to resolve the issues that caused the system to disable the integration.