https://github.com/salesforce/refocus-sgt-trust1
A Sample Generator Template for Refocus that pulls data from Trust1 (status.salesforce.com)
https://github.com/salesforce/refocus-sgt-trust1
refocus salesforce trust trust1
Last synced: 3 months ago
JSON representation
A Sample Generator Template for Refocus that pulls data from Trust1 (status.salesforce.com)
- Host: GitHub
- URL: https://github.com/salesforce/refocus-sgt-trust1
- Owner: salesforce
- License: bsd-3-clause
- Created: 2018-03-08T19:26:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-27T19:25:46.000Z (about 3 years ago)
- Last Synced: 2025-04-16T03:53:46.934Z (about 1 year ago)
- Topics: refocus, salesforce, trust, trust1
- Language: JavaScript
- Size: 23.4 KB
- Stars: 1
- Watchers: 16
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# refocus-sgt-trust1
Note: this repository is infrequently maintained.
## Description
A Refocus Sample Generator Template for generating samples based on Salesforce's Trust1 API.
## Context Variables
The following context variables may be specified by the Sample Generator and will be available to build the connection url, or as contexet data passed into the transform function and toUrl function:
- `baseTrustUrl` (required): The base url of your Trust1 API endpoint, e.g. `https://api.status.salesforce.com`.
- `errorValue`: An error sample's value, e.g. `-1`. Defaults to `-1` if not specified.
- `statusLinkUrl` (required): The base url of your Trust1 endpoint for a sample's related links, e.g. `http://status.salesforce.com/status/`.
- `statusMap`: An object which maps each Trust1 status enum value to a sample value, messageCode and messageBody. Defaults to the following if not specified:
```json
{
"OK": {
"value": "0"
},
"INFORMATIONAL_NONCORE": {
"value": "1"
},
"MAINTENANCE_NONCORE": {
"value": "1"
},
"MINOR_INCIDENT_NONCORE": {
"value": "2"
},
"MAJOR_INCIDENT_NONCORE": {
"value": "3"
},
"INFORMATIONAL_CORE": {
"value": "1",
"messageCode": "CORE"
},
"MAINTENANCE_CORE": {
"value": "1",
"messageCode": "CORE"
},
"MINOR_INCIDENT_CORE": {
"value": "2",
"messageCode": "CORE"
},
"MAJOR_INCIDENT_CORE": {
"value": "3",
"messageCode": "CORE"
}
}
```
## Transform Algorithm
Generate a sample based on the instance status.
# Revision History
* 2.0.0 - Use individual instance API endpoint instead of bulk
* 1.0.2 - include isActive=false in sample messageBody when isActive=false