{"id":19607201,"url":"https://github.com/robocorp/example-salesforce-sap","last_synced_at":"2025-10-25T02:37:54.876Z","repository":{"id":43402795,"uuid":"349394110","full_name":"robocorp/example-salesforce-sap","owner":"robocorp","description":"This robot demonstrates how to get accounts details from Salesforce and SAP. Robot also can start process to fix accounts in Salesforce if the Salesforce account data does not match account data in SAP.","archived":false,"fork":false,"pushed_at":"2022-03-03T07:09:19.000Z","size":36,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-09T09:26:51.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robocorp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-19T11:06:25.000Z","updated_at":"2024-12-13T02:22:41.000Z","dependencies_parsed_at":"2022-08-26T21:41:10.967Z","dependency_job_id":null,"html_url":"https://github.com/robocorp/example-salesforce-sap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robocorp%2Fexample-salesforce-sap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robocorp%2Fexample-salesforce-sap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robocorp%2Fexample-salesforce-sap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robocorp%2Fexample-salesforce-sap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robocorp","download_url":"https://codeload.github.com/robocorp/example-salesforce-sap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240895180,"owners_count":19874943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T10:09:15.224Z","updated_at":"2025-10-25T02:37:49.856Z","avatar_url":"https://github.com/robocorp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A robot that compares account data between Salesforce and SAP\n\nThis robot demonstrates how to get accounts details from [Salesforce](https://www.salesforce.com/) and [SAP](https://www.sap.com/).\n\nRobot can be used to start process to fix accounts in Salesforce if the Salesforce account data does not match account data in SAP.\n\n## Task descriptions\n\nThis robot includes several different tasks and their task descriptions are provided below. The tasks that are started either via Control Room or using Robocorp Assistant are **Compare Salesforce and SAP accounts** and **Fix comparison errors**.\n\n### **Task**: `Compare Salesforce and SAP accounts`\n\n- Run type: Unattended using Robocorp Agent (Windows)\n- Description: This task will get list of accounts from SFDC using Salesforce API and compares those accounts with SAP account data using SAP GUI interface. Results are stored into Excel file, which is stored into Google Drive.\n\n### **Task**: `Fix comparison errors`\n\n- Run Type: Attended using Robocorp Assistant (Windows/MacOS/Linux)\n- Description: This task will download the comparison Excel from Google Drive and creates user dialog, which will prompt user to select accounts to be fixed.\n\n### **Task**: `List accounts from SAP`\n\n- Run Type: Unattended (Windows)\n- Description: This task views set of SAP accounts using SAP GUI.\n\n### **Task**: `List accounts from Salesforce`\n\n- Run Type: Unattended (Windows/MacOS/Linux)\n- Description: This task gets all Salesforce accounts via Salesforce API and views them on Salesforce site using browser. Screenshot of each account's details are saved into files.\n\n### **Task**: `List accounts from Salesforce (no browser)`\n\n- Run Type: Unattended (Windows/MacOS/Linux)\n- Description: This task gets all Salesforce accounts via Salesforce API and saves data from each account into PDF file.\n\n### **Task**: `Create New Accounts to Salesforce`\n\n- Run Type: Unattended (Windows/MacOS/Linux)\n- Description: This task reads account data from a CSV file and adds an account (if it does not exist) or updates account data (if account already exists) in Salesforce.\n\n### **Task**: `Fix Account Name in SFDC`\n\n- Run Type: Unattended (Windows/MacOS/Linux)\n- Description: This task reads account data from a work item variable and adds an account (if it does not exist) or updates account data (if account already exists) in Salesforce.\n\n## The robot\n\n```robot\n*** Settings ***\nDocumentation     Execution report\nResource          SAP.resource\nResource          Salesforce.resource\n\n*** Tasks ***\nCompare Salesforce and SAP accounts\n    [Setup]    Google Drive Initialization\n    SAP Gui Login\n    SAP Compare Against Salesforce Accounts\n    [Teardown]    SAP Graceful Exit\n\nFix comparison errors\n    ${rows}=    Get Comparison Excel from Google Drive\n    ${response}=    Create Form For User    ${rows}\n    Control Room Start Fix Process    ${response}    ${rows}\n\nList accounts from SAP\n    SAP Gui Login\n    SAP Get List of Customers\n    [Teardown]    SAP Graceful Exit\n\nList accounts from Salesforce\n    Salesforce API Authorize\n    Salesforce List Accounts\n    Salesforce Account Screenshots\n\nList accounts from Salesforce (no browser)\n    Salesforce API Authorize\n    ${accounts}=    Salesforce List Accounts\n    Salesforce Account Screenshots With API    ${accounts}\n\nCreate New Accounts to Salesforce\n    Salesforce API Authorize\n    Salesforce Add or Update Accounts\n\nFix Account Name in SFDC\n    Salesforce API Authorize\n    ${vars}=    Get Work Item Variables\n    Salesforce Create or Modify Accounts    ${vars}\n```\n\n## Libraries\n\nThe [`RPA.Cloud.Google`](https://robocorp.com/docs/libraries/rpa-framework/rpa-cloud-google) library handles operations with Google Drive.\n\nThe [`RPA.Browser.Selenium`](https://robocorp.com/docs/development-guide/browser/selenium) manages the browser automation duties.\n\nThe [`RPA.Tables`](https://robocorp.com/docs/libraries/rpa-framework/rpa-tables) library takes care of saving the data into a CSV file.\n\nThe [`RPA.Excel.Files`](https://robocorp.com/docs/libraries/rpa-framework/rpa-excel-files) library takes care of saving the data into a Excel file.\n\nThe [`RPA.Desktop`](https://robocorp.com/docs/libraries/rpa-framework/rpa-desktop) library is used to take desktop screenshots.\n\nThe [`RPA.Desktop.Windows`](https://robocorp.com/docs/libraries/rpa-framework/rpa-desktop-windows) library handles starting of SAP GUI application.\n\nThe [`RPA.SAP`](https://robocorp.com/docs/libraries/rpa-framework/rpa-sap) library manages interactions with SAP GUI interface.\n\nThe [`RPA.Salesforce`](https://robocorp.com/docs/libraries/rpa-framework/rpa-salesforce) library handles operations with Salesforce REST API.\n\nThe [`RPA.PDF`](https://robocorp.com/docs/libraries/rpa-framework/rpa-pdf) library creates PDFs with account details.\n\nThe [`RPA.Dialogs`](https://robocorp.com/docs/libraries/rpa-framework/rpa-dialogs) library manages attended UI interface.\n\nThe [`ControlRoomLibrary`](https://github.com/robocorp/example-salesforce-sap/blob/master/libraries/ControlRoomLibrary.py) custom library is used to manage Control Room processes via Process API.\n\nOther Robotframework libraries in use are [`Collections`](https://robocorp.com/docs/libraries/built-in/collections), [`OperatingSystem`](https://robocorp.com/docs/libraries/built-in/operatingsystem) and [`String`](https://robocorp.com/docs/libraries/built-in/string)\n\n## Configuration\n\nCommon variables for the robot are stored in [`variables.py`](https://github.com/robocorp/example-salesforce-sap/blob/master/resources/variables.py) file.\n\nThe Google Drive credentials and several other sensitive data has been stored into Robocorp Vault.\n\n\u003e [Learn how to use the Robocorp vault to store secrets](https://robocorp.com/docs/development-guide/variables-and-secrets/vault).\n\n### Create a `vault.json` file for the credentials\n\nCreate a new file: `/Users/\u003cusername\u003e/vault.json`\n\n```json\n{\n  \"sap_ides\": {\n    \"connection\": \"SAP-CONNECTION-NAME-STRING\",\n    \"client\": \"SAP-CONNECTION-CLIENT-ID\",\n    \"user\": \"SAP-USERNAME\",\n    \"password\": \"SAP-PASSWORD\"\n  },\n  \"salesforce\": {\n    \"website\": \"URL-TO-SALESFORCE\",\n    \"web_username\": \"SALESFORCE-USERNAME\",\n    \"web_password\": \"SALESFORCE-PASSWORD\",\n    \"api_username\": \"SALESFORCE-API-USERNAME\",\n    \"api_password\": \"SALESFORCE-API-PASSWORD\",\n    \"api_token\": \"SALESFORCE-API-TOKEN\"\n  },\n  \"control_room_api\": {\n    \"workspace_id\": \"CONTROL-ROOM-WORKSPACE-ID\",\n    \"process_api_secret_key\": \"PROCESS-API-KEY\",\n    \"compare_process_id\": \"PROCESS-ID-FOR-COMPARE-PROCESS\",\n    \"fix_sfdc_name_process_id\": \"PROCESS-ID-FOR-FIX-SFDC-NAME-PROCESS\"\n  }\n}\n```\n\n### Create a `items.json` file for the work item variables\n\nCreate a new file: `/Users/\u003cusername\u003e/items.json`\n\n```json\n{\n  \"1\": {\n    \"1\": {\n      \"variables\": {}\n    }\n  }\n}\n```\n\n### Point `devdata/env.json` to your `vault.json` and `items.json` files\n\n```json\n{\n  \"RPA_SECRET_MANAGER\": \"RPA.Robocorp.Vault.FileSecrets\",\n  \"RPA_SECRET_FILE\": \"/Users/\u003cusername\u003e/vault.json\",\n  \"RPA_WORKITEMS_ADAPTER\": \"RPA.Robocorp.WorkItems.FileAdapter\",\n  \"RPA_WORKITEMS_PATH\": \"/Users/\u003cusername\u003e/items.json\",\n  \"RC_WORKSPACE_ID\": 1,\n  \"RC_WORKITEM_ID\": 1\n}\n```\n\n### Control Room vault\n\nCreate new secrets with names `sap_ides`, `control_room_api` and `salesforce`. The key-value pairs can be seen above in the `vault.json`.\n\n## I want to learn more!\n\nVisit [Robocorp docs](https://robocorp.com/docs/) to learn more about developing robots to automate your processes!\n\n[Robocorp portal](https://robocorp.com/portal/) contains many example robots with all the source code included.\n\nFollow the [Robocorp YouTube channel](https://www.youtube.com/Robocorp) for automation-related videos.\n\nVisit the [Software Robot Developer forum](https://forum.robocorp.com/) to discuss all-things automation. Ask questions, get answers, share your robots, help others!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobocorp%2Fexample-salesforce-sap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobocorp%2Fexample-salesforce-sap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobocorp%2Fexample-salesforce-sap/lists"}