Customer Hosted Models
Configuration
Web-server and public endpoint URL
You will need to host a publicly available web server that can process JSON over HTTPS. For security, we require the server to use HTTPS so any private information is encrypted end to end.
Authorization
The custom models service supports HTTP Basic Auth on your endpoint. You can configure username
and password
credentials for your custom model in your organization’s settings page.
If you are using multiple custom models, they will all share the same credentials. Therefore, all of your custom model endpoints must accept the same Basic Auth username
and password
.
Custom Model ID's
After setting up your custom model endpoint, contact your Alloy Solutions Architect with the endpoint URL. They will configure the custom model in our system & provide you with a custom model ID.
Custom Model Versioning
If you would like to test successive versions of your custom model, you can provide unique URLs to Alloy that invoke specific versions of your custom model. Alloy will then provide custom model ID's for each endpoint, allowing you to test different versions of your model within Workflow and Journey versions using Alloy's various testing tools.
Model Specifications
Input Payload Format
The custom model will receive service data attributes for services that have run prior to the Custom Models service in the workflow.
- The payload format consists of a serialized JSON string containing arrays of
attribute_name
/attribute_value
pairs for each service. You may need to deserialize this string in your custom model code (ex:json.loads()
in Python). - If any data is passed to the evaluation under the entity's
meta
section, it will be included in the custom model payload - Any output attributes calculated before running the custom model will be included in the payload under the
Output Attributes
section- It is important to make the custom model service dependent on the output attributes in some way to guarantee that they will be calculated before the custom model is run
- The
Data Supplied
section indicates whether certain PII was supplied or not (true
/false
).
Example:
{
// Org name will be the organization name in the dashboard
"[Org Name] Data Supplied":
[
{
"attributeName": "birth_date",
"attributeValue": "true"
},
{
"attributeName": "name_last",
"attributeValue": "true"
},
{
"attributeName": "name_first",
"attributeValue": "true"
},
...
],
"[Org Name] Meta":
[
{
"attributeName": "income",
"attributeValue": "100000"
},
...
],
"[Org Name] Output Attributes":
[
{
"attributeName": "my_output_attribute",
"attributeValue": "100"
},
...
],
// These sections depend on which services run prior to the custom model in the workflow
"Experian":
[
{
"attributeName": "ex",
"attributeValue": "100"
},
...
],
"Lexis Nexis":
[
{
"attributeName": "ex",
"attributeValue": "100"
},
...
],
"Another workflow service":
[
{
"attributeName": "ex",
"attributeValue": "100"
},
...
],
...
}
Output Format
Success
If successful, the custom model endpoint should return the following JSON response:
{
"modelSuccess": true,
"modelScore": number,
"modelVersion": number,
...Additional optional data...
}
Failure
If there is an error within the custom model code that can be handled, this can be returned to Alloy using the following JSON response:
{
"modelSuccess": false
}
Updated over 1 year ago