InRule For Salesforce Deployment Guide

2y ago
14 Views
2 Downloads
3.36 MB
85 Pages
Last View : 3d ago
Last Download : 3m ago
Upload by : Emanuel Batten
Transcription

InRule for Salesforce Deployment GuideDocument Updated against InRule v5.6.0Document Updated against InRule for Salesforce v2.8.0InRule does not upgrade this document after each Platform release, please see release notes for individual versionsif the version that you are using does not match the versions listed above.If you are working with earlier versions of any of the above products, the information in this document may not applyto you. Please check to see if earlier documentation is available to cover your needs.CONFIDENTIAL Any use, copying or disclosure by or to any other person than has downloaded a trial version of InRule or signedan NDA is strictly prohibited. If you have received this document by any other means than a download or an email from an InRuleemployee, please destroy it retaining no electronic or printed copies. Copyright 2020 InRule Technology, Inc.Microsoft is a registered trademark of Microsoft CorporationSalesforce is a registered trademark of Salesforce.com, Inc. All rights reserved. No parts of this work may be reproduced in any form or by any means – graphic, electronic, or mechanical,including photocopying, recording, taping, or information storage and retrieval systems – without the written permission from InRuleTechnologies, Inc.InRule, InRule Technology, irAuthor, irVerify, irServer, irCatalog, irSDK and irX are registered trademarks of InRule Technology,Inc. All other trademarks and trade names mentioned herein may be the trademarks of their respective owners and are herebyacknowledged.While every precaution has been taken in the preparation of this document, the publisher and the author assume no responsibilityfor errors or omissions, or for damages resulting from the use of information contained in this document or from the use of programsand source code that may accompany it. In no event shall the publisher and the author be liable for any loss of profit or any othercommercial damage caused or alleged to have been caused directly or indirectly by this document. The publisher and authorreserve the right to make corrections, updates, revisions, or changes to the information contained herein. InRule Technology, Inc.does not warrant the material described herein to be free from patent infringement.

InRule for Salesforce Deployment GuideTable of ContentsTable of Contents . 21Introducing InRule for the Salesforce Platform . 32Understanding your options . 42.1Salesforce – PaaS with Microsoft Azure . 42.2Salesforce - with IIS On-Premises Rule Execution Service . 43Performing the Installation . 53.1An overview of the Components needed . 53.2Gathering prerequisites . 63.3Deploying and Configuring Components . 113.3.1Catalog App Service . 113.3.2Rule Execution App Service for Salesforce . 143.3.3Upload License file . 203.3.4InRule for Salesforce App . 21Appendix A: Additional Resources . 32InRule’s Support Website . 32InRule’s Support Team . 39InRule’s ROAD Team . 39InRule Training Services . 39Appendix B: Anatomy of a Request for Execution of Rules Diagram . 40Appendix C: irX General Integration Concepts . 41Appendix D: Accessing Salesforce Directly from Rule Helper. 42Appendix E: Methods for Executing Rules from Salesforce . 501Adding a Lightning Button . 502Adding a Classic UI Button . 543Executing Rules from Apex . 574Executing Rules from Triggers . 595Executing Rules from Lightning Flow . 68Appendix F: Azure App Service Plan Configuration . 72Appendix G: Azure Application Insights Configuration . 75Appendix H: Endpoint Override Configuration . 77Appendix I: Salesforce and Rule Execution Service Event Logging . 79Copyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 2 of 85

InRule for Salesforce Deployment Guide1Introducing InRule for the Salesforce PlatformInRule provides InRule for the Salesforce Platform to enable rule execution integration with Salesforce.This Salesforce package and solution framework serves as a runtime companion to the irX for theSalesforce Platform rule authoring extensionThis guide focuses on the deployment of the Platform to your environment. While there are a number ofoptions available when it comes to how you choose to integrate InRule with Salesforce, this guide detailsthe primary deployment path for cloud-based integration with Microsoft Azure .Before beginning this guide, you may first want to familiarize yourself with the irX for the SalesforcePlatform product by reading the irX for the Salesforce Platform Help Documentation.This document also provides an addendum, Appendix E: Methods for Executing Rules from Salesforcethat discusses the different options available to you for running rules beyond what this Deployment Guidecovers. It is a good next step for implementers who are looking for advanced options for running rules.If you are interested in getting rule execution integration working between InRule and Salesforce asquickly and easily as possible, this guide is the best place to start!Additional material is available on the Downloads section of our support website. Please see theAdditional Resources section of this document for support website detail.This guide assumes that the reader has basic familiarity with Salesforce, irAuthor and irX for theSalesforce Platform. Important: The InRule for the Salesforce Platform plugin is comprised of several Apexcomponents. Apex is not supported by the Salesforce Professional Edition, thus InRulecannot function in a Professional Edition environment. The InRule for Salesforce App canonly be deployed to Salesforce Unlimited and Developer Edition orgs, where Apex issupported. Important: Not all Salesforce environments support API access. However, InRule for theSalesforce Platform requires a Salesforce instance that supports the API. If you attempt toconnect with an instance that does not support this access, you will receive an error whenconnecting that contains information such as "The REST API is not enabled for thisOrganization." The edition types that do NOT include API access are Contact Edition, GroupEdition and Professional Edition. Please refer to official Salesforce documentation for up-todate information as this list is subject to change.Copyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 3 of 85

InRule for Salesforce Deployment Guide2 Understanding your optionsSalesforce is available only as an online SaaS offering, but the Rule Execution Service and CatalogService components of InRule for Salesforce can be hosted anywhere an IIS site can be deployed. Thisguide assumes deployment in Azure, but an on-prem environment can also be used if required.2.1Salesforce – PaaS with Microsoft AzureThe suggested setup is to install InRule using a Platform-As-A-Service (PaaS) model on Microsoft Azure.This document discusses the following three components:1. Catalog App Service and Azure SQL Database2. Rule Execution App Service for Salesforce3. InRule Decision Client package for SalesforceSection 3 of this document, Performing the Installation: In Azure, provides a complete walkthrough forsetting up each of these components.Appendix B: Anatomy of a Request for Execution of Rules Diagram contains a more complete diagramdepicting how a standard request navigates through components.2.2 Salesforce - with IIS On-Premises Rule Execution ServiceIf for any reason you can’t use Azure App Service, the Rule Execution Service and Catalog Service canalso be installed in an on-prem environment, or in any IaaS server configured with IIS. The following threecomponents are required:1. Catalog Web Service and Database2. Rule Execution Web Service for Salesforce3. InRule Decision Client package for SalesforceInstallation Documentation and InRule Installer, which will be used to install the Catalog Service, areavailable on our support website’s downloads section and provide instructions for setting up the catalog.Detailed installation steps are not included with this guide, but the InRule.Salesforce.WebService.zippackage in the RuleExecutionAzureService folder can also be deployed in an on-prem environment. Thisis a Web Deploy package, so it can be deployed via MSDeploy or by copying the contents to an IIS Site.Copyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 4 of 85

InRule for Salesforce Deployment Guide3 Performing the InstallationThis section discusses the steps needed to integrate InRule with the Salesforce Platform. Using thisscenario InRule components are hosted on Microsoft Azure.3.1An overview of the Components neededThis guide will provide the instructions for setting up all the components below:Catalog App Service and Azure SQL DatabaseA Catalog service will be used to store Rule Apps that will be consumed by the Rule Execution AppService. This Catalog Service will be hosted as an Azure App Service. The back end of the CatalogService utilizes an Azure SQL Database for retrieval and persistence of Rule Applications.Rule Execution App Service for SalesforceThe Rule Execution App Service is responsible for loading Salesforce entity data, executing rules againstloaded data, and responding to Salesforce with rule execution results.InRule for Salesforce AppThe InRule for Salesforce App contains Apex classes, as well as custom settings and objects. It isconfigured to communicate with the execution service over REST.Copyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 5 of 85

InRule for Salesforce Deployment Guide3.2 Gathering prerequisitesThis section reviews what you will want to have prepared before you begin with the integration steps inthe next section.Required FilesThe following file should be downloaded from our support website’s downloads section before you begin: InRule for Salesforce.zipAfter you have downloaded this file, but before extracting, make sure that you go to the file properties forthe zip and select Unblock. If the zip file is not unblocked before extracting, the deployment scripts willnot be able to execute successfully.After unblocking the zip file, extract the contents to a working folder. When you are finished, you shouldhave a directory structure that looks like this: InRule for Salesforce.zip InRule for Salesforce readme.txt RuleApplications SalesforceRules.ruleappx RuleExecutionAzureService azuredeploy.json azuredeploy.parameters.json InRule.Salesforce.WebService.zip ll.(many other supporting files)Copyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 6 of 85

InRule for Salesforce Deployment GuideRule Authoring EnvironmentA rule authoring environment is used to upload a Rule Application to your Catalog Service. A ruleauthoring environment is a machine or virtual machine where irAuthor has been installed with the irX forthe Salesforce Platform extension. If you followed the instructions outlined in irX for the SalesforcePlatform Help Documentation then you should already have a rule authoring environment available toyou.We have made it a point to call out the rule authoring environment separately because it is important tobe aware of the licensing implications of this step. You will need to utilize an irAuthor license and an irXfor the Salesforce Platform license to activate the related components in the authoring environment. If youare a system administrator who does not intend to perform rule authoring activities after the deployment isup and running, you can either chose to borrow an environment from someone who will use a ruleauthoring environment, or you will want to be sure to deactivate your license when you’re finished withyour deployment responsibilities.Administrative AccountsSalesforce API Credentials: You will need to configure an API token and Connected App within yourSalesforce instance for use in both irX and the Rule Execution Service. When authoring in irX you willtypically use your personal account, but the execution service will typically use a separate serviceaccount. You will need to generate an API token for each account you want to use, but you can use thesame Connected App if desired.If the account does not already have an API token, then log into the Salesforce portal and navigate toUser menu My Settings Personal Reset My Security Token. You should receive an email within afew minutes that contains an API token.Copyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 7 of 85

InRule for Salesforce Deployment GuideNext, create a new Connected App in Salesforce that is configured for OAuth authentication. Navigate toSetup Create Apps Connected Apps New and create a new app. Fill out the Basic Informationand configure OAuth authentication. The Rule Execution Service and irX use the Username-Passwordauthentication flow, so there is no callback URL, but because Salesforce requires this field to bepopulated, enter any properly formatted URL; it will not be used. Also, be sure to add ‘Full access’ to theSelected OAuth Scopes.After saving, select the newly created Connected App and inspect the OAuth settings. Record theConsumer Key and the Consumer Secret.Copyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 8 of 85

InRule for Salesforce Deployment GuideOnce you’ve completed these steps, you should have the token, consumer key and consumer secret, allof which are required for authentication with Salesforce in addition to the username and password.Username and Password for the Rule Service: The rule execution service is protected using basicauthentication. You will need to choose a username and password when setting up the service in Azure,and use those same credentials when configuring Salesforce later.Administrative Password to use for SQL Server: You should decide what username and passwordyou want to use for administrative privileges on the SQL Server. You will use this password whenfollowing the referenced catalog setup guide.** This walkthrough will utilize the above administrative login and password for the Catalog Service toconnect to the SQL Server Database. In a more secure environment, a separate SQL User should becreated that only has access to the single database needed by the catalog. It is up to the reader of thisdocument to go this more secure route.Administrative Password to use for Catalog Service: You should decide what username andpassword you want to use for administrative privileges within irCatalog. You will use this password whenfollowing the referenced catalog setup guide and will need to provide it when deploying the ExecutionService.** This walkthrough utilizes the default login of ‘admin’ and password of ‘password’. It will be up to thereader to go through the process of utilizing the Catalog Manager to change these credentials to be moresecure.Administrative Login and Password for Microsoft Azure: You must have a username and passwordthat will be used to perform administrative tasks within Microsoft Azure.InRule Azure License FileYou will need a special .xml file used for licensing InRule in an Azure cloud environment. This may havebeen provided with your InRule Welcome package. You can contact support@InRule.com if you havequestions about where to get your license file.Copyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 9 of 85

InRule for Salesforce Deployment GuideDeciding resource namesThe following worksheet can be used to decide what to name Azure resources as you go through thisGuide.Many of these resources must have names that are unique in the world; they are hosted on MicrosoftAzure and are given domain names that match. We recommend creating a “Base” name that does notexceed 14 characters. We recommend encoding an organization name, an application name, and anenvironment name into this ‘Base’ name. For 5678901234You can choose to follow this convention or invent your own.Resource and DescriptionExample NameBase NameMyAppInRuleDevAzure Resource Group NameMyAppInRuleDevResourceGroupAzure SQL Server Namemust be lower casemyappinruledevsqlserverCatalog Database NameMyAppInRuleDevCatalogDbCatalog App Service NameMyAppInRuleDevCatalogServiceRule Execution App Service Plan NameMyAppInRuleDevRuleExecutionAppServicePlanRule Execution App Service NameMyAppInRuleDevRuleExecutionAppServiceCopyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 10 of 85

InRule for Salesforce Deployment Guide3.3 Deploying and Configuring Components3.3.1 Catalog App ServiceInstalling the Catalog App ServiceThe first major objective for a Salesforce implementation is the deployment of a Catalog service toMicrosoft Azure.During this process, you will be creating: An Azure SQL Server DatabaseAn Azure App Service to host the InRule Catalog in the Azure cloudWhen you are finished, you should be able to connect to this app service from a locally installed copy ofirAuthor, and successfully save a RuleApp to the catalog.The full process of installing the Catalog in Microsoft Azure is outlined in the documentation found on theInRule AzureAppServices GitHub, which can be found catalogPleasure ensure you are installing the irCatalog service, not the irServer Rule Execution Service, which isfound on the same page and is not compatible with Salesforce.Testing the Catalog App Service by uploading the starter Rule AppAt the conclusion of the installation process outlined above you should have a Catalog URI, Username,and Password to use to connect to the catalog service.Next, we will utilize your rule authoring environment to upload the Rule Application that you extracted intoyour working directory at:\InRule for px1: Navigate to this file in your rule authoring environment and double click on it,this will open the file with irAuthor.Copyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 11 of 85

InRule for Salesforce Deployment Guide2: Save the Rule Application by choosing File Save As Save to Catalog3: Choose Add Catalog, enter connection information for the Catalog Server thatyou deployed, and then select Use This.4: Save with the name SalesforceRules and the Label LIVECopyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 12 of 85

InRule for Salesforce Deployment GuideSave the Rule Application to the Catalog using the name of SalesforceRules. We must also be sure tolabel this Rule Application with the text ‘LIVE’, as configured in the app service configuration. Be sure notto forget this label, it is a small but important step!At this point, if you can click OK without an error, we have successfully saved the SalesforceRules RuleApp to the new Catalog that you have created. If you have any trouble getting to this point, it is advisedthat you resolve any issues with the Catalog before attempting to continue.Copyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 13 of 85

InRule for Salesforce Deployment Guide3.3.2 Rule Execution App Service for SalesforceNext, we’ll deploy the InRule Rule Execution service as an Azure App Service, along with all its Azureresource dependencies. To make this process easier, we’ll be using an Azure Resource Manager (ARM)template, which allows us to deploy and configure all the Azure resources the Rule Execution Servicerelies on. InRule for SalesforceThere are a number of methods for deploying an ARM template; this documentation will detail two: viaAzure CLI and via PowerShell. Alternatively, while this document does not provide a walkthrough of it,the ARM template provided is configured to work with Azure Portal deployment. For an overview of howto leverage this, reference Microsoft’s documentation: ce-manager/templates/deploy-portal1: Locate azuredeploy.parameters.jsonBefore deploying the ARM template, we need to define certain parameters.Locate the azuredeploy.parameters.json file in the RuleExecutionAzureService folder within the InRule forSalesforce.zip file downloaded in Section 3.2: Required Files.2: Update parametersOpen the file with your text editor of choice and edit the parameters listed belowCopyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 14 of 85

InRule for Salesforce Deployment Guide1 appServiceNameProvide a name for the Azure App Service that the Rule Execution Service will run on.Note, by default, an App Service Plan will be created by the ARM template. The AppService Plan will follow the naming convention of the App Service name you provide here,with “Plan” appended to the end (ex. appServiceNamePlan). If you wish to deploy your appservice to an already existing App Service Plan rather than create a new one, or for moreinformation on the necessary configurations for the App Service Plan, reference AppendixF: Azure App Service Plan Configuration2 catalogUriThe URI for the Catalog Service that will be loudapp.net/service.svc3 catalogUserUsername for Catalog Service, default value is ‘admin’.4 catalogPasswordPassword for Catalog Service, default is ‘password’, please change this using the catalogmanager!5 sfLoginUrlThe default for this is set to , but you canchange this to the relevant URL for your instance if you are deploying to something like asandbox instance6 sfUsernameSalesforce username for the service account used to connect from the execution service tothe Salesforce APICopyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 15 of 85

InRule for Salesforce Deployment Guide7 sfPasswordPassword for the Salesforce service account8 sfSecurityTokenAPI token for the Salesforce service account9 sfConsumerKeyOAuth consumer key for the connected app10 sfConsumerSecretOAuth consumer secret for the connected app11 executionServiceUsernameUsername used to secure the rule service. This same username will need to be provided toSalesforce during configuration12 executionServicePasswordPassword used to secure the rule service. This same password will need to be provided toSalesforce during configuration13 inRuleVersion (To deploy mostmodern version, leave as defaultvalue)This parameter allows the user to configure what version of the InRule Rule ExecutionService they wish to deploy. By default, this parameter will be set to the most modernversion.14. appServicePlanName (If you wishto override the default value)Provide a name for the Azure App Service Plan. If you leave this value blank it will bederived as the App Service name you provide above, with “Plan” appended to the end (ex.appServiceNamePlan)Note, by default, an App Service Plan will be created by the ARM template. If you wish todeploy your app service to an already existing App Service Plan rather than create a newone, or for more information on the necessary configurations for the App Service Plan,reference Appendix F: Azure App Service Plan Configuration15. appInsightsInstrumentationKeyIf you want to use Application Insights as a log sink in addition to the app service loggingalready enabled, provide an instrumentation key from an existing Application Insightsresource here. When providing a value for the ‘appInsightsResourceName’ parameter,leave this value blank, as the template will automatically fill this value in for you based onthe newly created resource Rule Execution Service Event Log.16. appInsightsResourceNameIf you want to use Application Insights as a log sink in addition to the app service loggingalready enabled, but do not already have an Insights resource that you want to use, specifya name for a new resource here. Specifying a value for this parameter will create a newApplication insights resource with the given name and populate the instrumentation key appsetting on the app service with the key from this new resource. If you provide a value forthis parameter, do not provide a value for appInsightsInstrumentationKey.Once you’ve finished configuring your parameters, save the completed parameters file and keep a sparecopy on hand for future upgrades or automation.3: Option 1: Deploy ARM Template with Azure CLINow that the ARM template is configured, we’ll deploy it to get the resources up and running. Thefollowing will detail how to use the Azure CLI to deploy the ARM template (Note, this section assumesAzure CLI has already been installed):3.1 Run Command Prompt or Powershell3.2 Navigate to the RuleExecutionAzureService folder3.3 Enter “az login” to login into AzureCopyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be distributed beyond the party to which this document was originally sent.Page 16 of 85

InRule for Salesforce Deployment Guide3.4 Enter your Azure admin credentials to login when prompted in thenew browser window opened3.5 Select the appropriate subscriptionIf your Azure account has access to multiple subscriptions, you will need to set your activesubscription to where you create your Azure resources:3.6 Create Resource groupIf you have not created a resource group yet, you will need to create one. You will need to define aname and a geographic location for where to host the resource. This example uses Central US:3.7 Execute the following command to deploy the ARM templat eReplace “ResourceGroupName” with the name of the Azure Resource Group you want to deploy toObserve that the template deploys with no errorsCopyright 2020 by InRule Technology, Inc. All Rights Reserved.CONFIDENTIAL – Not to be

components. Apex is not supported by the Salesforce Professional Edition, thus InRule cannot function in a Professional Edition environment. The InRule for Salesforce App can only be deployed to Salesforce Unlimited and Developer Edition orgs, where Apex is supported. Important: Not all Salesfo

Related Documents:

Salesforce can be accessed from the Salesforce AppExchange . RingCentral for Salesforce version 5.x, 6.0, and later includes Salesforce Mobile App. This enables you to make calls via the Salesforce Mobile App with RingCentral's quality phone services. If your Salesforce is already configured for Salesforce Mobile App,

Bruksanvisning för bilstereo . Bruksanvisning for bilstereo . Instrukcja obsługi samochodowego odtwarzacza stereo . Operating Instructions for Car Stereo . 610-104 . SV . Bruksanvisning i original

Understand the Salesforce Adapter. Salesforce Adapter Capabilities1-1. Salesforce Adapter Restrictions1-2. What Application Version Is Supported?1-3. Salesforce Adapter Use Cases1-3. Workflow to Create and Add a Salesforce Adapter Connection to an Integration1-3. Create a Salesforce Adapter Connection. Prerequisites for Creating a Connection2-1

To become a Certified Salesforce Administrator and Developer, you must pass the Salesforce Administrator Exam and the Salesforce App Builder Exam. You can pass the exams by following these easy steps. Step 1: Complete the Salesforce training course Step 2: Visit certification.salesforce.com and register to take both exams: Salesforce

Salesforce mobile app features. 1. It is powered by Salesforce platform. 2. We can use point and click tools to make our own application. 3. Salesforce mobile App is included with every Salesforce license. 4. Salesforce mobile app can be download from Google play store and App Store. 5. Salesforce mobile app has offline capability. 6.

The Salesforce Console Implementation Guide is for administrators who want to plan and implement a one time, basic setup of a console in Salesforce Classic. Important: This guide covers the setup and customization of Salesforce Classic console apps only. . If Salesforce Knowledge is set up, turn on the Knowledge sidebar so that console .

object field information in Salesforce is saved in Concur. NOTE: The user's access to the Salesforce objects is controlled in Salesforce. They must have read access to the object in Salesforce to search using the object's fields. The configuration process requires both the Concur and Salesforce administrators, and has the following steps: 1.

governing America’s indigent defense services has made people of color second class citizens in the American criminal justice system, and constitutes a violation of the U.S. Government's obligation under Article 2 and Article 5 of the Convention to guarantee “equal treatment” before the courts. 8. Lastly, mandatory minimum sentencing .