- 📖 Summary
- 📝 About Salesforce
- 📊 Data Flow
- 🔌 Connector Actions
- 🐍 Quick Start Examples
- 🔗 Useful Links
- 👏 Special Thanks
Salesforce, Inc. is an American cloud-based software company headquartered in San Francisco, California. It provides customer relationship management (CRM) software and applications focused on sales, customer service, marketing automation, e-commerce, analytics, and application development.
In order to leverage the Salesforce connector you need to perform initial setup of HrFlow tables in your Salesforce integration. The code below uses Salesforce API to create the following Salesforce Custom Objects:
Hrflow_Job__c
Hrflow_Profile__c
Hrflow_Experience__c
Hrflow_Education__c
Hrflow_Attachment__c
💡 Before running the code you can review all details about the Custom Objects in this JSON file
In order to run code below you need:
- API Access enabled for your organization. Check this link to see if it is supported by your Salesforce Edition
- A Salesforce user with API Enabled permission and enough privileges to create Custom Objects
- Install the simple-salesforce Python package
import json
from simple_salesforce import Salesforce
HRFLOW_CUSTOM_OBJECTS_PATH = "./hrflow_custom_objects.json"
# Salesforce credentials
username = "==============FILL==ME=============="
password = "==============FILL==ME=============="
# How Can I Find My Security Token and Use It in Data Loader | Salesforce Platform
# https://www.youtube.com/watch?v=nYbfxeSGKFM&ab_channel=SalesforceSupport
security_token = "==============FILL==ME=============="
# Find your Salesforce Organization ID
# https://help.salesforce.com/s/articleView?id=000385215&type=1
organization_id = "==============FILL==ME=============="
sf = Salesforce(username=username, password=password, security_token=security_token, organizationId=organization_id)
mdapi = sf.mdapi
with open(HRFLOW_CUSTOM_OBJECTS_PATH, "r") as f:
hrflow_custom_objects = json.load(f)
for custom_object in hrflow_custom_objects:
_custom_object = mdapi.CustomObject(
fullName = custom_object["object_name"],
label = custom_object["label"],
pluralLabel = custom_object["pluralLabel"],
nameField = mdapi.CustomField(
label = "Name",
type = mdapi.FieldType("Text")
),
fields=[
mdapi.CustomField(
**field,
) for field in custom_object["fields"]
],
deploymentStatus = mdapi.DeploymentStatus("Deployed"),
sharingModel = mdapi.SharingModel("ReadWrite")
)
mdapi.CustomObject.create(_custom_object)
Once logged to your Salesforce environment go to Setup then click Create > Custom Tab. Once created you should be able to view the list of records in each of the tables.
![HrFlow Jobs](https://private-user-images.githubusercontent.com/65894619/254926404-f20f62fd-e370-4e7f-8b85-0c4c2d4e43d1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0OTMyNDQsIm5iZiI6MTcyMTQ5Mjk0NCwicGF0aCI6Ii82NTg5NDYxOS8yNTQ5MjY0MDQtZjIwZjYyZmQtZTM3MC00ZTdmLThiODUtMGM0YzJkNGU0M2QxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIwVDE2MjkwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc2MGY3NzM3MDhkZjY0YTQzNDczNTAxZTVlNzE1NzYyYWEwOTNjMDFhZDQ4ZGJhNmI0NTUzNGQ2YzgwNWUzNDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0KlY1eQVwiDKPd-YdyufHJm-7wxHP_3aIAc1NOLGp4s)
![HrFlow Profiles](https://private-user-images.githubusercontent.com/65894619/254926400-828f25f5-a3da-4a4f-bcbb-56d6f75c3304.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0OTMyNDQsIm5iZiI6MTcyMTQ5Mjk0NCwicGF0a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BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY5ZDcwMDA2MTMxZmRjYzRlNDkzMWE4N2U0YThkYWUyOTFhNjZhY2Y1NDhhNDViYThmOTM5ODRjZTBkZTljMGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.-lHHzEjjDd5teVH-ppXCvSSadFupwno8KmHB98xI1xE)
![HrFlow Experiences](https://private-user-images.githubusercontent.com/65894619/254926385-3006d23f-2944-4e8e-89b1-c6b58a49de21.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0OTMyNDQsIm5iZiI6MTcyMTQ5Mjk0NCwicGF0aCI6Ii82NTg5NDYxOS8yNTQ5MjYzODUtMzAwNmQyM2YtMjk0NC00ZThlLTg5YjEtYzZiNThhNDlkZTIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIwVDE2MjkwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE4ZTg4MTdmYmRkYWM0MGE3Y2UxNWYzYzIwZjFjZjdhOTZmMDIxMTM0NmMzOGY3YTE1OThkMDk4ODk0Nzg4OGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.29mNXjHr-BKuDj2ZFvgExTMnohc07e5gvmBMaNGh15A)
![HrFlow Attachments](https://private-user-images.githubusercontent.com/65894619/254926359-dfcdba59-658b-4a75-870b-99c991f53935.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0OTMyNDQsIm5iZiI6MTcyMTQ5Mjk0NCwicGF0aCI6Ii82NTg5NDYxOS8yNTQ5MjYzNTktZGZjZGJhNTktNjU4Yi00YTc1LTg3MGItOTljOTkxZjUzOTM1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIwVDE2MjkwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIwZGYwNDY3YjhkMDY5YzEzZDEyZWVkMzcyY2NiMjc0NWZiNWNhMzdhMmRhNTY4ODdjZjczNTc0MDcwZTNiNTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.qnF-S0EhUOMQnLNRHIjcGrLSiJ64Stn9dU--4Jdl39c)
![Scoring](https://private-user-images.githubusercontent.com/135601200/312418567-2434d21a-1994-4e16-a6b0-65d7e2a6fa49.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0OTMyNDQsIm5iZiI6MTcyMTQ5Mjk0NCwicGF0aCI6Ii8xMzU2MDEyMDAvMzEyNDE4NTY3LTI0MzRkMjFhLTE5OTQtNGUxNi1hNmIwLTY1ZDdlMmE2ZmE0OS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyMFQxNjI5MDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mNDEzMGE3ZDllZmZjNDAyOGQ3Y2Q5NDhlNjFhMDAxMTdiYTgwYzZhNjExNWM3Y2Y2NTc0ZjI3ZmRlMWNjYjY5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.CxAKH9Rol1wLGq5c0dtG1572dIOAE21EuuW48Bn8yeY)
In this section, we outline the data flow between different components of the connector. The following schema provides a graphical representation of the data exchange process
Action | Description |
---|---|
Pull profile list | Retrieves profiles from Salesforce HrFlow Profile & Co Custom Objects and writes them to an Hrflow.ai source |
Push profile | Pushs specific Profile from HrFlow and writes it to HrFlow_Profile__c & Co Custom Objects in Salesforce |
Pull job list | Retrieves jobs from Salesforce HrFlow Job Custom Object and writes them to an Hrflow.ai board |
To make sure you can successfully run the latest versions of the example scripts, you have to install the package from PyPi. To browse the examples of actions corresponding to released versions of 🤗 this connector, you just need to import the module like this :
Once the connector module is imported, you can leverage all the different actions that it offers.
For more code details checkout connector code
- 📄 Visit Salesforce website to learn more.
- ⚙️ Salesforce Developer portal: (https://developer.salesforce.com/)
- 💻 Connector code on our Github.
- 💻 HrFlow.ai : the-forest-tree - Software Engineer
- 🤝 Salesforce : Salesforce Developer Centers