Salesforce Integration: Custom Objects and their Fields

by Skilljar Customer Training
Follow

This article contains a detailed list of all the custom Salesforce objects and their fields. This documentation is designed to share with your Salesforce developers or anyone needing detailed information about Skilljar's Salesforce integration. 

Please note that not all text fields in Skilljar currently allow for that many characters, but that moving forward all text fields in Salesforce will allow for the max 255 characters.

Your SFDC admin can also install the Salesforce Example Reports Managed Package which will create some example reports and custom report types to begin interacting with Skilljar data.

Note: We are currently updating our Salesforce help center articles. You can find more objects and fields in this Excel file. Please reach out to your Customer Success Manager (CSM) for more information. 

 

Contents:

 

Common Fields

For a full list of objects and fields, download this Excel file, or please reach out to your Customer Success Manager (CSM) for more information.

There are a few fields that are common to many of the Skilljar objects and have special usage.

skilljar__Obfuscated_Id__c

This field represents the Skilljar ID of the object instance within the Skilljar platform.  This ID is consistent across our API, the SFDC App, and our BI connector.

skilljar__Contact__c

The Contact field is an optional lookup from our Skilljar objects to a SFDC Contact.  If you’ve checked the “Link contacts” checkbox in Skilljar, then when one of these objects is updated, we look for a corresponding Contact object with the same email address as the associated skilljar__Student__c object.  If we find a Contact (or more than one) - we link to the most recently created Contact object.  If we do not find a Contact with the same email address, we create a new Contact record and link to that.

Most times, these newly created “orphaned contacts” will need to be associated with an Account.  Skilljar does not attempt to do this - as it often requires human intervention, or business-specific logic to map accordingly.  Most customers of ours write a custom Apex Trigger or have created a process to manually assign orphaned contacts on a periodic basis.

 

Custom Objects

Here is a list of some of the custom objects in the Skilljar Salesforce app. For the full list, please download this Excel file, or reach out to your Customer Success Manager (CSM) for more information.

Student

Signup Field

Course (Published Course)

Enrollment

Course Progress (and certifications) 

Promo Code

Vilt Session Event

Lesson

Lesson Progress 

 

Student

"skilljar__Student__c": {

"skilljar__Contact__c": {

"length": 18, "type": "reference", "label": "Contact" },

"skilljar__Email__c": {

"length": 80, "required": true, "type": "email", "label": "Email" },

"skilljar__First_Name__c": {

"length": 255, "type": "string", "label": "First Name" },

"skilljar__Last_Name__c": {

"length": 255, "type": "string", "label": "Last Name" },

"skilljar__Obfuscated_Id__c": {

"required": true, "label": "Skilljar Id", "length": 255, "externalId": true,

"unique": true, "type": "string"

}

 

Signup Field

"skilljar__Signup_Field__c": {

"skilljar__Student__c": {

"length": 18, "required": true, "type": "reference", "label": "Student" },

"skilljar__Contact__c": {

"length": 18, "type": "reference", "label": "Contact" },

"skilljar__Domain_Name__c": {

"length": 255, "required": true, "type": "string",

"label": "Domain Name" },

"skilljar__Label__c": {

"length": 255, "required": true, "type": "string", "label": "Label" },

"skilljar__Obfuscated_Id__c": {

"required": true, "label": "Skilljar Id", "length": 255, "externalId": true,

"unique": true, "type": "string" },

"skilljar__Value__c": {

"length": 255, "type": "string", "label": "Value" }

}

 

Course (Published Course)

"skilljar__Published_Course__c": {

"skilljar__Course_Id__c": {

"length": 255, "type": "string", "label": "Course Id" },

"skilljar__Course_Title__c": {

"length": 255, "required": true, "type": "string",

"label": "Course Title" },

"skilljar__Course_URL__c": {

"length": 255, "required": true, "type": "url", "label": "Course URL" },

"skilljar__Domain__c": {

"length": 255, "required": true, "type": "string", "label": "Domain" },

"skilljar__Lesson_Count__c": {

"length": 0, "required": true, "type": "double", "label": "Lesson Count" },

"skilljar__Live__c": {

"length": 0, "required": true, "type": "boolean", "label": "Live" },

"skilljar__Obfuscated_Id__c": {

"required": true, "label": "Skilljar Id", "length": 255, "externalId": true,

"unique": true, "type": "string" }

}

 

Enrollment

"skilljar__Enrollment__c": {

"skilljar__Published_Course__c": {

"length": 18, "required": true, "type": "reference",

"label": "Published Course" },

"skilljar__Student__c": {

"length": 18, "required": true, "type": "reference", "label": "Student" },

"skilljar__Active__c": {

"length": 0, "required": true, "type": "boolean", "label": "Active" },

"skilljar__Contact__c": {

"length": 18, "type": "reference", "label": "Contact" },

"skilljar__Enrolled_At__c": {

"length": 0, "required": true, "type": "datetime",

"label": "Enrolled At" },

"skilljar__Expires_At__c": {

"length": 0, "type": "datetime", "label": "Expires At" },

"skilljar__Obfuscated_Id__c": {

"required": true, "label": "Skilljar Id", "length": 255, "externalId": true,

"unique": true, "type": "string" },

"skilljar__Promocode__c": {

"length": 255, "type": "string", "label": "Promocode" },

"skilljar__Purchase_Currency_Code__c": {

"length": 255, "type": "string", "label": "Purchase Currency Code" },

"skilljar__Purchase_Price__c": {

"length": 0, "type": "currency", "label": "Purchase Price" },

"skilljar__Purchase__c": {

"length": 18, "type": "reference", "label": "Purchase" }

}

 

Course Progress

"skilljar__Course_Progress__c": {

"skilljar__Published_Course__c": {

"length": 18, "required": true, "type": "reference",

"label": "Published Course" },

"skilljar__Student__c": {

"length": 18, "required": true, "type": "reference", "label": "Student" },

"skilljar__Certificate_Code__c": {

"length": 255, "type": "string", "label": "Certificate Code" },

"skilljar__Certificate_Validation_Url__c": {

"length": 255, "type": "url", "label": "Certificate Validation Url" },

"skilljar__Completed_At__c": {

"length": 0, "type": "datetime", "label": "Completed At" },

"skilljar__Completed_Lesson_Count__c": {

"length": 0, "type": "double", "label": "Completed Lesson Count" },

"skilljar__Contact__c": {

"length": 18, "type": "reference", "label": "Contact" },

"skilljar__Credit_Unit_Plural__c": {

"length": 255, "type": "string", "label": "Credit Unit Plural" },

"skilljar__Credits_Earned__c": {

"length": 255, "type": "string", "label": "Credits Earned" },

"skilljar__Enrolled_At__c": {

"length": 0, "type": "datetime", "label": "Enrolled At" },

"skilljar__Latest_Activity__c": {

"length": 0, "type": "datetime", "label": "Latest Activity" },

"skilljar__Lesson_Count__c": {

"length": 0, "type": "double", "label": "Lesson Count" },

"skilljar__Max_Score__c": {

"length": 0, "type": "double", "label": "Max Score" },

"skilljar__Obfuscated_Id__c": {

"required": true, "label": "Skilljar Id", "length": 255, "externalId": true,

"unique": true, "type": "string" },

"skilljar__Score__c": {

"length": 0, "type": "double", "label": "Score" },

"skilljar__Success_Status__c": {

"length": 255, "type": "picklist", "label": "Success Status" }

}

 

Promo Code

"skilljar__Promo_Code__c": {

"skilljar__Promo_Code_Pool__c": {

"length": 18, "required": true, "type": "reference",

"label": "Promo Code Pool" },

"skilljar__Active__c": {

"length": 0, "required": true, "type": "boolean", "label": "Active" },

"skilljar__Code__c": {

"length": 255, "required": true, "type": "string", "label": "Code" },

"skilljar__Max_Uses__c": {

"length": 0, "required": true, "type": "double", "label": "Max Uses" },

"skilljar__Obfuscated_Id__c": {

"required": true, "label": "Skilljar Id", "length": 255, "externalId": true,

"unique": true, "type": "string" },

"skilljar__Use_Count__c": {

"length": 0, "required": true, "type": "double", "label": "Use Count" }

}

 

Vilt Session Event

"skilljar__Vilt_Session_Event__c": {

"skilljar__Timezone__c": {  

"label": "Timezone", "length": 255, "type": "string"}, 

"skilljar__Ends_At__c": {  

"label": "Ends At", "length": 0, "type": "datetime"}, 

"skilljar__Skilljar_Id__c": {  

"label": "Skilljar Id", "length": 255, "externalId": True, "unique": True, "type": "string"},

"skilljar__Starts_At__c": {

"label": "Starts At", "length": 0, "type": "datetime"}, 

"skilljar__Vilt_Session__c": {

"label": "Vilt Session", "length": 18, "type": "reference"}, 

"skilljar__Location__c": {

"label": "Location", "length": 255, "type": "string"}

}

 

Lesson

"skilljar__Lesson__c": {

"skilljar__Skilljar_Id__c": {  

"label": "Skilljar Id", "length": 255, "externalId": True, "unique": True, "type": "string"},

"skilljar__Course__c": {

"label": "Course", "length": 18,"type": "reference"},

"skilljar__Title__c": {  

"label": "Title", "length": 255, "type": "string"}

}

 

Lesson Progress

"skilljar__Lesson_Progress__c": {

"skilljar__Last_Viewed_At__c": {  

"label": "Last Viewed At", "length": 0, "type": "datetime"}, 

"skilljar__View_Count__c": {  

"label": "View Count", "length": 0,     "type": "double"}, 

"skilljar__Success_Status__c": {  

"label": "Success Status", "length": 4099, "type": "multipicklist"}, "skilljar__Course_Progress__c": {  

"label": "Course Progress", "length": 18, "type": "reference"}, 

"skilljar__Skilljar_Id__c": {  

"label": "Skilljar Id", "length": 255, "externalId": True, "unique": True, "type": "string"},

"skilljar__Student__c": {  

"label": "Student", "length": 18, "type": "reference"}, "skilljar__Max_Score__c": {  

"label": "Max Score", "length": 0, "type": "double"},

"skilljar__Score__c": {  

"label": "Score", "length": 0, "type": "double"},

"skilljar__Lesson__c": {  

"label": "Lesson", "length": 18, "type": "reference"}, "skilljar__Completed_At__c": {  

"label": "Completed At", "length": 0,   "type": "datetime"}

}

 

Appendix A: Example Payment Processor Purchase Data

Each payment gateway that Skilljar integrates with returns a different set of fields related to the transaction.  Skilljar places the payment processor data in a JSON dictionary and includes this data in the skilljar__Payment_Processor_Purchase_Data__c field of the skilljar__Purchase__c object.

 

Accessing Payment Processor Data via Apex Code (Example)

In Salesforce Apex code, JSON can be easily parsed by the JSONParser class.  The following example shows how to retrieve a value (in this case, the transaction_id) from th the skilljar__Payment_Processor_Purchase_Data__c field:

 

skilljar__Purchase__c purchase = [SELECT skilljar__Payment_Processor_Purchase_Data__c FROM skilljar__Purchase__c WHERE skilljar__Obfuscated_Id__c = 'abcd12345'];

 

String responseData = purchase.skilljar__Payment_Processor_Purchase_Data__c;

 

Map<String, Object> data = (Map<String, Object>)JSON.deserializeUntyped(responseData);

 

String transactionId = (String)data.get('transaction_id');

 

Apex Trigger to add Transaction ID to Purchase (Example)

You may extend the Skilljar custom objects with your own fields.  Building on the previous section, if you added a custom “Transaction ID” field (Transaction_Id__c) to the skilljar__Purchase__c object, you could write an Apex Trigger to automatically set the new field value after a skilljar__Purchase__c was updated:

 

trigger addTransactionId on skilljar__Purchase__c (after insert, after update) {

   List<skilljar__Purchase__c> p = [SELECT Id, Transaction_Id__c, skilljar__Payment_Processor_Purchase_Data__c FROM skilljar__Purchase__c WHERE Id IN: Trigger.newMap.keySet()];

   for (skilljar__Purchase__c purchase: p) {

      if (purchase.Transaction_Id__c == Null && purchase.skilljar__Payment_Processor_Purchase_Data__c != Null){

           String responseData = purchase.skilljar__Payment_Processor_Purchase_Data__c;

           Map<String, Object> data = (Map<String, Object>)JSON.deserializeUntyped(responseData);

           if (data.containsKey('transaction_id')) {

               String transactionId = (String)data.get('transaction_id');

               purchase.Transaction_Id__c = transactionId;

               update purchase;

           }

       }

 

   }

}

 

Appendix B: Skilljar Custom Object Schema

This can be created in your instance of SFDC by using the Schema Builder and by only selecting the Skilljar Custom Objects - This Static image was updated on 7/18/2022 - future changes may impact this schema. For a more detailed view, select the PDF link below.

Schema Builder _ Salesforce.pdf

Screen_Shot_2022-07-18_at_12.22.54_PM.png

Powered by Zendesk