Field Squared API Services

<back to all web services

IntegrationRule

Represents a set of rules what the system reads to take a particular set of actions. These dtos allow transfer of that data from the client to the server and vice versa.

The following routes are available for this service:
GET,PUT,DELETE/{WorkspaceId}/IntegrationRule/{Id}
import java.math.*
import java.util.*
import net.servicestack.client.*


/**
* Represents a set of rules what the system reads to take a particular set of actions. These dtos allow transfer of that data from the client to the server and vice versa.
*/
open class IntegrationRule
{
    var WorkspaceId:String? = null
    var Name:String? = null
    var Data:HashMap<String,Object> = HashMap<String,Object>()
    var ObjectType:String? = null
    var Id:String? = null
    var ConditionGroupItems:ArrayList<ConditionGroupItem> = ArrayList<ConditionGroupItem>()
    var ActionsToTake:ArrayList<Action> = ArrayList<Action>()
    var LastUpdated:Date? = null
    var ModulePipeline:ArrayList<RuleModuleDefinition> = ArrayList<RuleModuleDefinition>()
    var Enabled:Boolean? = null
    var WorkdayRestricted:Boolean? = null
    var Teams:ArrayList<String> = ArrayList<String>()
    var AllowProgrammaticTrigger:Boolean? = null
}

open class ConditionGroupItem
{
    var ConditionGroups:ArrayList<ConditionGroup> = ArrayList<ConditionGroup>()
    var Precedence:Int? = null
    var GroupIdentifier:Int? = null
    var BooleanOperator:String? = null
}

open class ConditionGroup
{
    var Condition:Condition? = null
    var Precedence:Int? = null
    var GroupIdentifier:Int? = null
    var BooleanOperator:String? = null
}

open class Condition
{
    var ValueComparedTo:String? = null
    var ValueToCompare:String? = null
    var ComparisonOperator:PossibleComparisons? = null
}

enum class PossibleComparisons
{
    Lte,
    Lt,
    Gt,
    Gte,
    Eq,
    Ne,
    Null,
    Notnull,
    Chg,
    Starts,
    Like,
}

open class Action
{
    var Id:String? = null
    var CallType:String? = null
    var ActionToTake:String? = null
    var Destination:String? = null
    var ExternalId:String? = null
    var ExternalParentId:String? = null
    var DeleteTypeIfNotExists:String? = null
    var DataTree:HashMap<String,Object> = HashMap<String,Object>()
    var Data:String? = null
    var DataTypes:HashMap<String,Object> = HashMap<String,Object>()
}

open class RuleModuleDefinition
{
    var IsOutputModule:Boolean? = null
    var Name:String? = null
    var Prerequisites:ArrayList<String> = ArrayList<String>()
    var Parameters:HashMap<String,Object> = HashMap<String,Object>()
    var Type:String? = null
    var OutputAction:Action? = null
}

Kotlin IntegrationRule DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /{WorkspaceId}/IntegrationRule/{Id} HTTP/1.1 
Host: dev.fieldsquared.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"WorkspaceId":"String","Name":"String","Data":{"value":"String"},"ObjectType":"String","Id":"String","ConditionGroupItems":[{"ConditionGroups":[{"Condition":{"ValueComparedTo":"String","ValueToCompare":"String","ComparisonOperator":"LTE"},"Precedence":0,"GroupIdentifier":0,"BooleanOperator":"String"}],"Precedence":0,"GroupIdentifier":0,"BooleanOperator":"String"}],"ActionsToTake":[{"Id":"String","CallType":"String","ActionToTake":"String","Destination":"String","ExternalId":"String","ExternalParentId":"String","DeleteTypeIfNotExists":"String","DataTree":{"String":{}},"Data":"String","DataTypes":{"String":{}}}],"LastUpdated":"\/Date(-62135596800000-0000)\/","ModulePipeline":[{"IsOutputModule":false,"Name":"String","Prerequisites":["String"],"Parameters":{"String":{}},"Type":"String","OutputAction":{"Id":"String","CallType":"String","ActionToTake":"String","Destination":"String","ExternalId":"String","ExternalParentId":"String","DeleteTypeIfNotExists":"String","DataTree":{"String":{}},"Data":"String","DataTypes":{"String":{}}}}],"Enabled":false,"WorkdayRestricted":false,"Teams":["String"],"AllowProgrammaticTrigger":false}