Prior to using CloudApps' SuMo for Salesforce, administrators will need to decide which object triggers to add, activate or deactivate, in order to enable Rewards to be generated for users of the application.
Following installation, a broad selection of Objects are trigger-enabled.
Administrators can choose to disable any objects they don't wish to be assessed. They can also add further objects to be trigger-enabled and hence assessed for Rewards.
To generate the triggers necessary for assessment, see the Trigger Deployment Tool section below. This provides details of how to generate and configure triggers for additional standard, optional or custom objects.
- To disable triggers on any of the supported Objects, within the sidebar select Build | Installed Packages
- Click on Configure beside the SuMo package name
- Click on the Configuration section
- Administrators can turn off the triggers by unchecking the "Active" checkbox for the Objects they wish to disable. Doing so turns off Behaviour assessment for the objects that have been disabled. Rewards will therefore no longer be generated for any Behaviour based on an object that has had its trigger disabled
- Each change is saved immediately
- To enable triggers on additional Objects, select the object required from the Add an Object picklist
- The page will then reload and the object that was selected will have been added to the list of trigger-enabled objects (it will not yet be active)
- Administrators can then check the "Active" checkbox for the object they wish to trigger-enable.
- Clicking Delete in the Edit column will remove objects that have been added from the list. This will also disable any active triggers on those objects
Trigger Deployment Tool
The Trigger Deployment Tool can be used to generate and deploy the triggers necessary to allow standard, optional or custom objects to generate Rewards via the Assessment Engine.
The Tool can also optionally be used to generate test classes, but it should be noted that the code which is generated does not take into account any business logic defined in validation rules, workflow rules, triggers or any other configurations. Therefore, the test class code may need to be modified before it can be deployed successfully using this tool.
To access the Trigger Deployment Tool:
- Enter Setup by clicking on the Setup link at the top of the screen
- Within the sidebar select Build | Installed Packages
- Click on Configure next to the SuMo package name
- On the Application Configuration page, expand the Configuration section
- Click the Trigger Deployment Tool link in the 3rd paragraph
- Select the Object(s) you wish to generate Triggers for:
- By default, the "Generate Test Class" checkbox is selected, but you can deselect it if you do not want the tool to generate a template test class.
- Click "Next"
- On the next screen, you'll see the Trigger code for the Object(s) you have chosen. If you elected to generate Test Classes there will also be a tab which displays the template Test Class code for you to amend if necessary:
- Click Deploy
- The deployment may take a few minutes, so you'll probably see message such as: "Packaged code and uploading to Salesforce", followed by "Deployment in progress". Once the Object(s) have deployed successfully, you will see a "Deployment Successful!" message.
If the Deployment fails, you may need to edit the Test Class Code as mentioned at the beginning of this section.
Streaming API enablement
- Enter Setup by clicking on the "Setup" link at the top of the screen
- Within the Salesforce Setup sidebar, navigate to Build | Customize | User Interface
- Ensure the "Enable Streaming API" option is checked (in the Setup section)
- Click Save