Predefined RepliConnect Operations

There are five predefined operations available in RepliConnect: SetProperties, which are used to directly update a property or relationship on the object, and four Collection operations. Collection operations are performed on collections, and a collection exists only on a relationship. There are four types of collection operations: CollectionClear, CollectionAdd, CollectionEdit, and CollectionRemove.

SetProperties

Directly updates a property or relationship on the object.

Example:

[
  {
    "Action":"Edit",
    "Type":"Replicon.Domain.User",
    "Identity":"2",
    "Operations":[{
        "__operation":"SetProperties",
        "FirstName":"John",
        "HolidayCalendar":{
          "__type":"Replicon.Domain.Calendar",
          "Identity":"3"
        }
      }
    ]
  }
]

CollectionClear

Clears a collection completely, removing all objects from that collection.   

Example:

[
  {
    "Action": "Edit",
    "Type": "Replicon.Domain.User",
    "Identity": "45",
    "Operations": 
    [
      {
        "__operation": "CollectionClear",
        "Collection": "PayrollRateHistory"
      }
    ]
  }
]

CollectionAdd

Adds a new or existing object to a collection.   

Example: Adding an existing object

[
  {
    "Action": "Edit",
    "Type": "Replicon.Domain.User",
    "Identity": "45",
    "Operations": 
    [
      {
        "__operation": "CollectionAdd",
        "Collection": "Roles",
        "Value": 
        {
          "__type": "Replicon.Domain.Role",
          "Identity": "2"
        }
      }
    ]
  }
]

Example: Adding a new object

[
  {
    "Action": "Edit",
    "Type": "Replicon.Domain.User",
    "Identity": "45",
    "Operations": 
    [
      {
        "__operation": "CollectionAdd",
        "Collection": "OvertimeRules",
        "Operations": 
        [
          {
            "__operation": "SetProperties",
            "OvertimeRule": 
            {
              "__type": "Replicon.TimeOff.Domain.BusinessRules.OvertimeRule",
              "Identity": "7"
            },
            "EffectiveDate": 
            {
              "__type": "Date",
              "Past": "True"
            },
            "EndDate": 
            {
              "__type": "Date",
              "Future": "True"
            }
          }
        ]
      }
    ]
  }
]

CollectionEdit

Edits an existing object in a collection.

Example:

[
  {
    "Action": "Edit",
    "Type": "Replicon.Domain.User",
    "Identity": "45",
    "Operations": 
    [
      {
        "__operation": "CollectionEdit",
        "Collection": "PayrollRateHistory",
        "Identity": "121",
        "Operations": 
        [
          {
            "__operation": "SetProperties",
            "HourlyRate": 65
          }
        ]
      }
    ]
  }
]

CollectionRemove

Removes an object from a collection.

Example:

[
  {
    "Action": "Edit",
    "Type": "Replicon.Domain.User",
    "Identity": "45",
    "Operations": 
    [
      {
        "__operation":  "CollectionRemove",
        "Collection": "Roles",
        "Identity": "2"
      }
    ]
  }
]