ProFile Developers
STAAR Alert API (Stella) for Xerox Custom Workflow
v1.0
(Last Updated 7/26/2023)
API Client: Xerox
Authorization Credential:
eGVyb3hCb3Q6MCElKktxS2ZKUTlpTFk3c011
Token expiration: 15 minutes
The API connection is maintained by an installation of Claris/FileMaker Server. The
installed version is 19.3.2.203
Additional API information can be found at https://opal.profiledevelopers.com/fmi/data/
apidoc/
The Client lookup can be performed in two steps:
1) the request for auth token
2) the request to find a specific Client in the system
Upon successful lookup of Client and completion of bot tasks, a third step will be used
to create a required Note linked to the Client
3) the request to perform a script
The complete expected responses for the illustrated calls are detailed below.
1) API Request for Token
Call Type
POST
Endpoint
https://opal.profiledevelopers.com/fmi/data/vLatest/databases/
Stella_CRM/sessions
Headers Required
Content-type:application/json
Authorization: Basic <credential above>
Expected Response - Status 200 OK
{
"response": {
"token": <token>
},
"messages": [
{
"code": "0",
"message": "OK"
}
]
}
2. API Request to find a specific Client in the system
The example data shown below of “Fake Miller” and “Dudeman Test Fake” both
exist in the live system and can be used for testing.
Call Type
POST
Endpoint
https://opal.profiledevelopers.com/fmi/data/vLatest/databases/
Stella_CRM/layouts/xeroxBotAccess/_find
Headers Required
Content-Type:application/json
Authorization:Bearer <token>
Body Required
{“query”: [{<queryJSON>}]}
The available keys for searching are:
Type of Data JSON Key .
Client Is Active “Active”
Client First Name “NameFirst”
Client Last Name “NameLast”
Client DOB “DOB_Date”
Equipment Line “res_contracthh_STOCK::Line”
Equipment Account “res_contracthh_STOCK::AccountNumber”
Client Payor “res_tpp_PAYOR::PayorID”
An example query to look up the Client with the name “Dudeman Test Fake”
would be structured as:
{
"query": [
{
"NameLast": "Test Fake",
"NameFirst": "Dudeman",
"DOB_Date": "9/9/1925",
"Active": 1
}
]
}
Always include the “Active” boolean.
Expected Response - Status 200 OK
{
"response": {
"dataInfo": {
"database": "Stella_CRM",
"layout": "xeroxBotAccess",
"table": "RES__RESIDENT",
"totalRecordCount": 63962,
"foundCount": 1,
"returnedCount": 1
},
"data": [
{
"fieldData": {
"res_contracthh_STOCK::Line": "FAKE",
"res_contracthh_STOCK::AccountNumber":
"1001",
"res_TPP::MemberID": "0987654321",
"res_tpp_PAYOR::PayorID": "3220",
"res_caremgr_PAYOREMP::Email1":
"testemail@test.com",
"Active": 1,
"id": "EC4FE375-9D4C-41D7-AFD8-
A215C6C56969",
"NameFirst": "Dudeman",
"NameLast": "Test Fake",
"DOB_Date": "09/09/1925",
"Phone": "(555) 555-5555",
"ClientID": "CL09914168"
},
"portalData": {},
"recordId": "26411",
"modId": "44"
}
]
},
"messages": [
{
"code": "0",
"message": "OK"
}
]
}
An example query to look up the Client with Equipment Line/Account ‘FAKE 1000’
would be structured as:
{
"query": [
{
"res_contracthh_STOCK::Line": "FAKE",
"res_contracthh_STOCK::AccountNumber":1000,
"Active": 1
}
]
}
Always include the “Active” boolean.
Expected Response - Status 200 OK
{
"response": {
"dataInfo": {
"database": "Stella_CRM",
"layout": "xeroxBotAccess",
"table": "RES__RESIDENT",
"totalRecordCount": 63962,
"foundCount": 1,
"returnedCount": 1
},
"data": [
{
"fieldData": {
"res_contracthh_STOCK::Line": "FAKE",
"res_contracthh_STOCK::AccountNumber":
"1000",
"res_TPP::MemberID": "1234567890",
"res_tpp_PAYOR::PayorID": "3220",
"res_caremgr_PAYOREMP::Email1":
"nigrellizv@automatedsecurityALERT.com",
"Active": 1,
"id":
"64D17E30-54C1-0A4A-95C4-958C31067D23",
"NameFirst": "FAKE",
"NameLast": "MILLER",
"DOB_Date": "05/05/1980",
"Phone": "(412) 555-7894",
"ClientID": "CL09915849"
},
"portalData": {},
"recordId": "28127",
"modId": "46"
}
]
},
"messages": [
{
"code": "0",
"message": "OK"
}
]
}
JSON data values to be parsed for Bot operation would be as follows
Type of Data JSON Key .
Client Member ID “res_TPP::MemberID”
Care Mgr. Email “res_caremgr_PAYOREMP::Email1”
Client ID “ClientID”
Client Phone “Phone”
System Table UUID “id”
The “id” field value returned from the search will need to be saved as a parameter
to send for next step…
3. Perform script to create the Note linked to the Client
Call Type
GET
Endpoint
https://opal.profiledevelopers.com/fmi/data/vLatest/databases/
Stella_CRM/layouts/xeroxBotAccess_ACTIVITY/script/
api_xeroxCreateNote?script.param=<id>
Headers Required
Authorization:Bearer <token>
Body Required
None
The <id> in the endpoint URL would be saved from the previous Client query in
step 2.
For example, using the id value of 64D17E30-54C1-0A4A-95C4-958C31067D23
would result in the Client “Fake Miller” to have a note created within the system.
Expected Result - Status 200 OK
{
"response": {
"scriptError": "0"
},
"messages": [
{
"code": "0",
"message": "OK"
}
]
}
Potential Error Responses for step 1
{
"messages": [
{
"code": "212",
"message": "Invalid user account or password"
}
],
"response": {}
}
Potential Error Responses for step 2 or 3
If the authentication token has expired
{
"messages": [
{
"code": "952",
"message": "Invalid FileMaker Data API token (*)"
}
],
"response": {}
}
Potential Error Responses for step 2
If the search criteria was invalid for step 2
{
"messages": [
{
"code": "401",
"message": "No records match the request"
}
],
"response": {}
}
Potential Error Responses for step 3
If no parameter was sent for step 3
{
"response": {
"scriptResult": "error, no parameter was sent",
"scriptError": "0"
},
"messages": [
{
"code": "0",
"message": "OK"
}
]
}
Potential Error Responses for step 3 (continued)
If parameter of <id> was not sent correctly to endpoint for step 3
{
"response": {
"scriptResult": "error, invalid id sent as parameter
(401)",
"scriptError": "0"
},
"messages": [
{
"code": "0",
"message": "OK"
}
]
}
Questions can be directed to:
teresa@profiledevelopers.com
412.951.8135