Skip to main content
Mappings

Mappings

Updated over a month ago

This article is outdated and may not be up to date on our current processes. We are launching new integrator training in 2025. If you would like to become an integrator please see our SDK and reach out to partnerships@ipaas.com.

Process

Any fields you define in the “custom name here” data model will become standard mappable fields.

Following this syntax, you will have made the field available to the user for mappings

[JsonProperty(“3rd party Variable name”, NullValueHandling = NullValueHandling.ignore)]
Public “data Type” “some variable name” {get; set;}

Example

These three handle some variables being worked with some being ignored for default mappings but making them readily available to the customer.

[JsonProperty(“extension_attributes”)]
Public CatalogDataProductExtensionInterface ExtensionAttributes { get; set;}

[JsonIgnore]
Public decimal? StockItemQty { get { return (decimal?)GetStockItemField(“qty”); } set { SetStockItemField(“qty” ,value); } }

[JsonIgnore]
Public bool? StockItemInStock { get { return (bool?)GetstockItemField(“is_in_stock”); } set { SetStockItemField(“is_in_stock”, value); } }

This last portion will handle any unique portion to an integration while some things are the same some may differ from customer to customer with no way of knowing such as custom fields.

[JsonProperty(“custom_attributes”)]
Public List <FrameworkAttributeInterface> Custom Attributes { get; set; }

Unique custom fields per customer when done in this manner will be returned by the API as a list:

[{“attribute_code”: “Field 1”, “value”: “123”}, {“attribute_code”: “Field 2”, “value”: “abc”} ]

Custom fields once created need to be made inside of IPaaS.com for example...

Once inside of the dashboard enter your subscription management --->Subscriptions.

Click on the Icon for custom fields on your respective integration.

Create the Custom Field needed:

The field created is then available among the others created to be mapped.

Runtime Handling

During runtime each custom field mapped will use the CustomFieldHandler

GetValueCustomField when direction is TO IPaaS.com

SetValueCustomField when direction is FROM IPaaS.com

Inside of these functions you can handle the way to deal with the data as needed.

For example, below is a function in the custom field handler that is being called to handle the custom attributed design within the model itself.

public override object GetValueCustomField(object inputObject, string propertyName)
{
If (inputObject is CatalogDataProductInterface)
Return ((CatalogDataProductInterface)inputObject).GetCustomAttribute(propertyName);
}

Inside of a data model of relevance

Public object GetCustomAttribute(string name) 
{
If (CustomAttribute == null)
Return null;

Var customAttribute = CustomAttributes.Find(x => x.AttributeCode == name);
If (customAttribute == null)
Return null;
Return customAttribute.Value;
}
Did this answer your question?