ApproverType Examples

Query for Approver Types

Query for all approver types.

[
  {
    "Action": "Query",
    "QueryType": "ApproverTypeByAll",
    "DomainType": "Replicon.Domain.Approvals.ApproverType",
    "Args": []
  }
]

Query for Approver Types by Id

Query for approver types by Id.

[
  {
    "Action": "Query",
    "QueryType": "ApproverTypeById",
    "DomainType": "Replicon.Domain.Approvals.ApproverType",
    "Args": [
      [
        2
      ]
    ]
  }
]

Create a Supervisor type of ApproverType

Create a Supervisor type of ApproverType.

[
  {
    "Action": "Create",
    "Type": "Replicon.Domain.Approvals.ApproverType",
    "Operations": [
      {
        "__operation": "SetProperties",
        "Name": "My Approver Type",
        "Disabled": "false",
        "Description": "My Approver Type-Description",
        "OverridePermissions": "false",
        "ApproverRole": {
          "Identity": "Supervisor"
        }
      }
    ]
  }
]

Create a Specified User type of ApproverType

Create a Specified User type of ApproverType for Internal Users (Replicon.Domain.User).

[
  {
    "Action": "Create",
    "Type": "Replicon.Domain.Approvals.ApproverType",
    "Operations": [
      {
        "__operation": "SetProperties",
        "Name": "My Approver Type",
        "Disabled": "false",
        "Description": "My Approver Type-Description",
        "OverridePermissions": "false",
        "ApproverRole": {
          "Identity": "SpecifiedUser"
        },
        "InternalUser": {
          "Identity": "2"
        }
      }
    ]
  }
]

Create a Specified User type of ApproverType

Create a Specified User type of ApproverType for External Users (Replicon.Domain.ExternalUser).

[
  {
    "Action": "Create",
    "Type": "Replicon.Domain.Approvals.ApproverType",
    "Operations": [
      {
        "__operation": "SetProperties",
        "Name": "My Approver Type",
        "Disabled": "false",
        "Description": "My Approver Type-Description",
        "OverridePermissions": "false",
        "ApproverRole": {
          "Identity": "SpecifiedUser"
        },
        "ExternalUser": {
          "Identity": "10"
        }
      }
    ]
  }
]

Change an existing ApproverType to Supervisor type of role and its Name

Change an existing ApproverType to Supervisor type of role and its Name.

[
  {
    "Action": "Edit",
    "Type": "Replicon.Domain.Approvals.ApproverType",
    "Identity": "2",
    "Operations": [
      {
        "__operation": "SetProperties",
        "Name": "My Approver Type New Name",
        "ApproverRole": {
          "Identity": "Supervisor"
        }
      }
    ]
  }
]

Disable an existing ApproverType

Disable an existing ApproverType.

[
  {
    "Action": "Edit",
    "Type": "Replicon.Domain.Approvals.ApproverType",
    "Identity": "2",
    "Operations": [
      {
        "__operation": "SetProperties",
        "Disabled": "true"
      }
    ]
  }
]

Disable an existing ApproverType's override permissions

Disable an existing ApproverType's override permissions.

[
  {
    "Action": "Edit",
    "Type": "Replicon.Domain.Approvals.ApproverType",
    "Identity": "2",
    "Operations": [
      {
        "__operation": "SetProperties",
        "OverridePermissions": "false"
      }
    ]
  }
]

Enable and set an existing ApproverType's override permissions

Enable and set an existing ApproverType's override permissions.

[
  {
    "Action": "Edit",
    "Type": "Replicon.Domain.Approvals.ApproverType",
    "Identity": "2",
    "Operations": [
      {
        "__operation": "SetProperties",
        "OverridePermissions": "true",
        "AllowBlankRejectComment": "true",
        "ViewTaskProgress": "true",
        "ApproveTask": "true",
        "ApproveTimeOff": "true",
        "ApproveExpense": "true",
        "ApproveTimeOffRequest": "true",
        "EditTask": "true",
        "EditTimeOff": "true",
        "EditExpense": "true",
        "EditTimeOffRequest": "true",
        "ViewAllTask": "true",
        "ViewAllTimeOff": "true",
        "ViewAllExpense": "true"
      }
    ]
  }
]