Skip to main content

Jasper PIM Mapping Functions

Reference for the Jasper PIM-specific functions you can use in Dynamic Formula mappings and mapping collection filters.

Overview

The Jasper PIM integration provides a set of ready-made functions you can call when building mappings. They handle common conversions and lookups for Jasper PIM, such as resolving a Jasper PIM product ID from a SKU, checking whether a product exists, converting iPaaS.com custom fields, options, and categories into their Jasper PIM equivalents, building a product price list, and resolving a location name, so you don't have to write that logic yourself.

Where you can use these functions

These functions are available anywhere you write a formula for the Jasper PIM integration:

  • Dynamic Formula mappings: where a destination field's value is produced by a formula rather than mapped directly from a source field.

  • Mapping collection filters: where a formula decides whether a record should be processed.

  • Error filters: a mapping collection's error filter, which sits alongside its collection filter. When the error filter's formula resolves to true, the transfer raises an error that is held in the Error Logs for review and is not retried automatically.

  • Translation collections: where a translation entry uses a formula as its source value.

How to use them

  • Call a function by name and pass the values it needs in parentheses, for example: await ConvertProductSkuToJasperProductId(sku).

  • Each function's signature shows its name, the parameters it accepts (with their types), and the type of value it returns. Use it as the reference for exactly how to call the function.

  • Function names and formula syntax are case-sensitive, so type each name exactly as shown. Whether the values a function matches are treated as case-sensitive varies by function, and is called out in the relevant parameter's description.

  • Some of these functions are asynchronous (their signature returns a Task) and must be called with await; the rest are synchronous and are called directly. Each function's How to call it example shows the correct form.

  • Some functions provide more than one form (overloads): the same function name with different parameter combinations. Pick the form whose inputs you have; each function's Signatures list shows the available forms.

  • Each function runs at sync time, against the data in your connected Jasper PIM account and your iPaaS.com subscription.

The functions are grouped below by the area of the integration they support.

Products

Use these to resolve a Jasper PIM product, check whether one exists, or convert custom fields into product attributes.

ConvertProductSkuToJasperProductId

What it does: Looks up a Jasper PIM product by an iPaaS.com product SKU and returns the Jasper PIM product ID. Returns an empty string if no product matches.

Signature: Task<string> ConvertProductSkuToJasperProductId(object sku)

How to call it: await ConvertProductSkuToJasperProductId(sku)

Parameter

Type

Required

Default

Description

sku

object

Yes

N/A

The iPaaS.com product SKU.

Returns: string. The Jasper PIM product ID, or an empty string if no product matches.

Example: await ConvertProductSkuToJasperProductId("ABC-123") returns the Jasper PIM product ID, for example "56789".

When to use it: When mapping a product reference to Jasper PIM and you have the SKU but need the Jasper PIM product ID.

IsProductExist

What it does: Checks whether a product with the given SKU exists in Jasper PIM. Returns true if it exists, false if not.

Signature: Task<bool> IsProductExist(string sku)

How to call it: await IsProductExist(sku)

Parameter

Type

Required

Default

Description

sku

string

Yes

N/A

The iPaaS.com product SKU to check in Jasper PIM.

Returns: bool. true if a product with the SKU exists in Jasper PIM; otherwise false.

Example: await IsProductExist("SKU123") returns true when a product with that SKU exists in Jasper PIM.

When to use it: In a mapping filter, to check whether a product already exists in Jasper PIM before creating or updating it.

ConvertCustomFieldsToJasperAttributes

What it does: Converts a set of iPaaS.com custom fields into Jasper PIM product attributes, matching each field to a Jasper PIM attribute by name. Custom fields without a matching attribute are skipped.

Signature: Task<List<ProductAttribute>> ConvertCustomFieldsToJasperAttributes(object customFields)

How to call it: await ConvertCustomFieldsToJasperAttributes(customFields)

Parameter

Type

Required

Default

Description

customFields

object

Yes

N/A

The iPaaS.com custom fields to convert (a list of entries, each with a name and value).

Returns: List<ProductAttribute>. The Jasper PIM product attributes for the matched custom fields.

Example: await ConvertCustomFieldsToJasperAttributes(customFields) returns the Jasper PIM attributes for custom fields such as Color and Size.

When to use it: When mapping iPaaS.com custom fields to Jasper PIM product attributes.

Options and Categories

Use these to synchronize a product's options and categories into Jasper PIM.

ConvertOptionsToJasperOptionId

What it does: Synchronizes a product's options (and their values) into Jasper PIM, creating or updating the options, option values, and option set as needed, and returns the Jasper PIM option set ID.

Signature: Task<int> ConvertOptionsToJasperOptionId(object options)

How to call it: await ConvertOptionsToJasperOptionId(options)

Parameter

Type

Required

Default

Description

options

object

Yes

N/A

The iPaaS.com product options to synchronize.

Returns: int. The Jasper PIM option set ID for the product's options.

Example: await ConvertOptionsToJasperOptionId(options) returns the Jasper PIM option set ID, for example 1024.

When to use it: When mapping a product's options (such as size or color) to Jasper PIM.

ConvertCategoriesToJasperId

What it does: Takes a product's iPaaS.com categories and returns the matching Jasper PIM categories. Categories that do not already exist in Jasper PIM are skipped.

Signature: Task<List<Category>> ConvertCategoriesToJasperId(object categories)

How to call it: await ConvertCategoriesToJasperId(categories)

Parameter

Type

Required

Default

Description

categories

object

Yes

N/A

The iPaaS.com product categories to convert.

Returns: List<Category>. The Jasper PIM categories that match the supplied categories.

Example: await ConvertCategoriesToJasperId(categories) returns the Jasper PIM categories for the supplied product categories.

When to use it: When mapping a product's categories to Jasper PIM, keeping only categories that already exist there.

Prices

Use this to build a single-entry product price list for Jasper PIM.

SetSinglePrice

What it does: Builds a price list containing a single price entry from a price base and selling price, and optionally an MSRP.

Signatures (pick the form with the inputs you need): - List<ProductPrice> SetSinglePrice(string priceBase, double sellPrice) - List<ProductPrice> SetSinglePrice(string priceBase, double sellPrice, double msrp)

How to call it: SetSinglePrice(priceBase, sellPrice)

Parameter

Type

Required

Default

Description

priceBase

string

Yes

N/A

The pricing base (for example a currency code such as "USD").

sellPrice

double

Yes

N/A

The selling price for the price base.

msrp

double

No

N/A

The manufacturer's suggested retail price. Include it to use the three-argument form.

Returns: List<ProductPrice>. A price list with one entry set from the supplied values.

Example: SetSinglePrice("USD", 49.99) returns a price list with one USD price of 49.99.

When to use it: When mapping a single product price (optionally with an MSRP) to Jasper PIM.

Inventory Locations

Use this to resolve a location name for inventory mapping.

ConvertIpaasLocationIdToJasperLocationName

What it does: Looks up an iPaaS.com location by its ID and returns the location's name, for use as the Jasper PIM location name during inventory mapping.

Signature: Task<string> ConvertIpaasLocationIdToJasperLocationName(object locationId)

How to call it: await ConvertIpaasLocationIdToJasperLocationName(locationId)

Parameter

Type

Required

Default

Description

locationId

object

Yes

N/A

The iPaaS.com location ID.

Returns: string. The location's name.

Example: await ConvertIpaasLocationIdToJasperLocationName("LOC123") returns the location name, for example "New York Warehouse".

When to use it: When mapping inventory to Jasper PIM and you need the location name for an iPaaS.com location ID.

Related Documents

Did this answer your question?