Overview
The BigCommerce integration provides ready-made functions you can call when building mappings. They handle common lookups and conversions against your BigCommerce store and your iPaaS.com data (matching brands, categories, customers, and orders, building product options, and totaling order values), 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 BigCommerce 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 ConvertBrandNameToBCBrandIdAsync(BrandName).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.
Every function that returns a
Taskis asynchronous and must be called withawait, as shown in each How to call it example.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.
Optional parameters are marked in the parameter table, along with the value used when you omit them.
Each function runs at sync time, against the data in your connected BigCommerce store and your iPaaS.com subscription.
The functions are grouped below by the area of the integration they support.
Products
Functions for matching and preparing product data: brands, tax classes, URLs, images, related products, and product lookups.
ConvertBrandNameToBCBrandIdAsync
What it does: Looks up a brand by name in your BigCommerce store and returns its brand ID.
Signature: Task<int?> ConvertBrandNameToBCBrandIdAsync(string brandName)
How to call it: await ConvertBrandNameToBCBrandIdAsync(brandName)
Parameter | Type | Required | Default | Description |
brandName |
| Yes | N/A | The name of the brand to match in BigCommerce. |
Returns: int?. The BigCommerce brand ID.
Example: "Adams" returns 12.
When to use it: Use during product syncs to map a product's brand name to the correct BigCommerce brand ID.
ConvertTaxClassNameToBCTaxClassIdAsync
What it does: Looks up a tax class by name in BigCommerce and returns its tax class ID.
Signature: Task<int?> ConvertTaxClassNameToBCTaxClassIdAsync(string taxClassName)
How to call it: await ConvertTaxClassNameToBCTaxClassIdAsync(taxClassName)
Parameter | Type | Required | Default | Description |
taxClassName |
| Yes | N/A | The name of the tax class to match in BigCommerce. |
Returns: int?. The BigCommerce tax class ID, or null if no matching tax class exists.
Example: "Test Tax Class" returns 5.
When to use it: Use in pricing or tax-related mappings to map a tax class name to its BigCommerce tax class ID.
SanitizeUrlPath
What it does: Cleans a string into a valid, SEO-friendly BigCommerce URL path, removing characters that are not allowed and converting the result to lowercase.
Signature: string SanitizeUrlPath(string input)
How to call it: SanitizeUrlPath(input)
Parameter | Type | Required | Default | Description |
input |
| Yes | N/A | The original string that needs to be sanitized for use as a BigCommerce URL path. |
Returns: string. Sanitized lowercase BigCommerce URL path.
Example: "My Product@URL!#2024" returns "my-producturl2024".
When to use it: Use when generating SEO-friendly URLs for products or categories during a sync to BigCommerce.
RemoveAllImagesAsync
What it does: Removes all images currently attached to a BigCommerce product.
Signature: Task<bool> RemoveAllImagesAsync(int productId)
How to call it: await RemoveAllImagesAsync(productId)
Parameter | Type | Required | Default | Description |
productId |
| Yes | N/A | The BigCommerce product ID whose associated images should be removed. A value of 0 is ignored and results in no action. |
Returns: bool. Always returns true, even if no images are found (indicates success).
Example: 12345 returns true.
When to use it: Use to clear a product's existing images before adding a fresh set.
RemoveImage
What it does: Removes a single image from a BigCommerce product, identified by the product and image IDs.
Signature: Task<bool> RemoveImage(int productId, string imageId)
How to call it: await RemoveImage(productId, imageId)
Parameter | Type | Required | Default | Description |
productId |
| Yes | N/A | The unique identifier of the BigCommerce product from which the image should be removed. |
imageId |
| Yes | N/A | The unique identifier of the BigCommerce product image to be deleted from the specified product. |
Returns: bool. Always returns true, even if the image does not exist.
Example: product 12345 and image "67890" returns true.
When to use it: Use to delete one specific product image during a sync or cleanup.
ProductImageListFromFilenames
What it does: Builds a list of BigCommerce product images from one or more image file names or URLs, optionally replacing the product's existing images first. The first image supplied is marked as the product thumbnail.
Signatures (pick the form with the inputs you need):
Task<List<ProductImage>> ProductImageListFromFilenamesAsync(int productId, params string[] urlPaths)Task<List<ProductImage>> ProductImageListFromFilenames(int productId, string imageNames, bool cleanupOldImages = false)Task<List<ProductImage>> ProductImageListFromFilenames(int productId, string[] imageNames, bool cleanupOldImages = false)Task<List<ProductImage>> ProductImageListFromFilenames(int productId, List<string> imageNames, bool cleanupOldImages = false)Task<List<ProductImage>> ProductImageListFromFilenames(int productId, bool cleanupOldImages = false, params string[] urlPaths)
How to call it: await ProductImageListFromFilenamesAsync(productId, urlPaths)
Parameter | Type | Required | Default | Description |
productId |
| Yes | N/A | The BigCommerce product ID to which the images will be associated. If set to 0, no API update occurs. |
urlPaths |
| No | N/A | One or more image file paths or URLs to associate with the product. The first image in the list is flagged as the thumbnail. (params array) Accepted by the forms that take a params array. |
imageNames |
| No | N/A | An array of image file names (or URLs) to associate with the product. Supplied as an array, a list, or a single string depending on the form. |
cleanupOldImages |
| No |
| A boolean flag indicating whether existing images should be removed before adding new ones. |
Returns: List<ProductImage>. The newly added or updated BigCommerce product images.
Example: supplying ["image1.jpg", "image2.jpg"] for a product returns a two-image list with image1.jpg set as the thumbnail.
When to use it: Use in product sync or migration mappings that need to build or refresh a product's images; set the cleanup option to replace the existing images first.
ProductImageIdFromFilename
What it does: Finds the BigCommerce image ID that matches a given image file name from a product's existing images. BigCommerce may rename uploaded files, so matching is done on the file name portion.
Signature: int? ProductImageIdFromFilename(int productId, string imageName, List<ProductImage> bcImages)
How to call it: ProductImageIdFromFilename(productId, imageName, bcImages)
Parameter | Type | Required | Default | Description |
productId |
| Yes | N/A | The BigCommerce product ID to which the image is associated. |
imageName |
| Yes | N/A | The full image file name or URL (e.g., "https://example.com/image1.jpg"). |
bcImages |
| Yes | N/A | A list of existing ProductImage objects from BigCommerce for the specified product. |
Returns: int?. The BigCommerce ProductImage ID if a match is found, or null otherwise.
Example: given a product's existing images and "https://cdn.example.com/myImage.jpg", returns the matching image's ID, or null if none matches.
When to use it: Use to locate an existing product image by file name, for example, to update or reference it instead of re-uploading.
ConvertImagesToBigCommerceImageList
What it does: Combines one or more product image objects into a single list so they can be handled uniformly.
Signature: List<BigCommerce.v3.DataModels.ProductImage> ConvertImagesToBigCommerceImageList(params BigCommerce.v3.DataModels.ProductImage[] images)
How to call it: ConvertImagesToBigCommerceImageList(images)
Parameter | Type | Required | Default | Description |
images |
| No | N/A | One or more BigCommerce ProductImage objects to be converted into a list. (params array) |
Returns: List<BigCommerce.v3.DataModels.ProductImage>. All input BigCommerce product images.
Example: passing a single product image returns a list containing that one image.
When to use it: Use to normalize one or several images into a list when building product image data for BigCommerce.
ConvertRelatedProductsToBigCommerceIdsAsync
What it does: Converts a set of iPaaS.com related products into the matching BigCommerce product IDs, optionally limited to a specific relationship type.
Signature: Task<List<int>> ConvertRelatedProductsToBigCommerceIdsAsync(object relatedProducts, string typeFilter = "all")
How to call it: await ConvertRelatedProductsToBigCommerceIdsAsync(relatedProducts)
Parameter | Type | Required | Default | Description |
relatedProducts |
| Yes | N/A | The input collection of iPaaS.com related products to map. |
typeFilter |
| No |
| Optional filter to include only specific related product types ("all", "replacement", "similar item", "related product"). Default is "all". |
Returns: List<int>. The mapped BigCommerce product IDs.
Example: filtering a set of related products by "replacement" returns the BigCommerce IDs of the replacement products.
When to use it: Use when syncing a product's related items to populate its related products in BigCommerce, optionally narrowing to one relationship type.
GetProductIdBySku
What it does: Looks up a product in BigCommerce by SKU and returns its product ID.
Signature: Task<int?> GetProductIdBySku(string sku)
How to call it: await GetProductIdBySku(sku)
Parameter | Type | Required | Default | Description |
sku |
| Yes | N/A | The product SKU used to identify and retrieve the product from BigCommerce. |
Returns: int?. The BigCommerce product ID for the given SKU, or null if not found.
Example: "TOP-XLL" returns the matching product's ID, or null if no product has that SKU.
When to use it: Use when you need a product's BigCommerce ID from its SKU, for example, during order creation or product mapping.
GetVariantIdBySku
What it does: Looks up a product variant in BigCommerce by SKU and returns its variant ID, optionally refining the match using a unit custom field value.
Signature: Task<int?> GetVariantIdBySku(string sku, object customFields, string unitCustomFieldName)
How to call it: await GetVariantIdBySku(sku, customFields, unitCustomFieldName)
Parameter | Type | Required | Default | Description |
sku |
| Yes | N/A | The SKU used to fetch the target product from BigCommerce. |
customFields |
| Yes | N/A | The iPaaS.com custom field object (a list of custom-field name/value pairs) from the source record being mapped. |
unitCustomFieldName |
| Yes | N/A | The custom field name (e.g. "SellingUnit"). |
Returns: int?. The BigCommerce variant/product ID for the given SKU, or null if not found.
Example: for SKU "SHOES|MULTI|7|NARROW^DOZ" with a "SellingUnit" of "DOZ", returns the matching variant's ID, or null if none matches.
When to use it: Use when you need a variant's BigCommerce ID from its SKU, including cases where a unit custom field distinguishes the variant.
Product Options and Modifiers
Functions for building the product modifiers (input fields and choice controls) that appear on a BigCommerce product.
RemoveModifier
What it does: Creates a product modifier that is flagged for removal, so an existing modifier can be deleted from a product.
Signature: ProductModifier RemoveModifier()
How to call it: RemoveModifier()
Parameters: none.
Returns: ProductModifier. A BigCommerce ProductModifier object with Remove = true.
Example: calling it returns a modifier flagged with removal set to true.
When to use it: Use when an existing product modifier should be removed during a product update.
ToTextModifier
What it does: Creates a text-input product modifier, from a simple single-line field to a configurable field with a default value and length or line limits.
Signatures (pick the form with the inputs you need):
ProductModifier ToTextModifier(bool required)ProductModifier ToTextModifier(bool required, string defaultValue)ProductModifier ToTextModifier(bool required, string defaultValue, int? textMaxLines, int? textMinLength, int? textMaxLength)
How to call it: ToTextModifier(required)
Parameter | Type | Required | Default | Description |
required |
| Yes | N/A | Indicates whether the input field is mandatory. |
defaultValue |
| No | N/A | Default text value to pre-fill in the input field. Can be null. Accepted by the longer forms. |
textMaxLines |
| No | N/A | Maximum number of lines allowed. If greater than 1, creates a multi-line text field. Accepted by the longest form. |
textMinLength |
| No | N/A | Minimum number of characters required in the field. Can be null. Accepted by the longest form. |
textMaxLength |
| No | N/A | Maximum number of characters allowed in the field. Can be null. Accepted by the longest form. |
Returns: ProductModifier. A BigCommerce ProductModifier object configured as a text input field.
Example: ToTextModifier(true) returns a required single-line text field.
When to use it: Use to add a text field to a product, such as a personalization or special-instructions input; use the longer forms when you need a default value or length limits.
ToNumberModifier
What it does: Creates a numeric-input product modifier, optionally with a default value and range or integer-only limits.
Signatures (pick the form with the inputs you need):
ProductModifier ToNumberModifier(bool required)ProductModifier ToNumberModifier(bool required, int? defaultValue)ProductModifier ToNumberModifier(bool required, int? defaultValue, string numberLimitMode, bool numberIntegersOnly, int? LowestValue, int? HighestValue)
How to call it: ToNumberModifier(required)
Parameter | Type | Required | Default | Description |
required |
| Yes | N/A | Indicates whether the numeric field is mandatory. |
defaultValue |
| No | N/A | Default numeric value that will be pre-filled in the input. Can be null. Accepted by the longer forms. |
numberLimitMode |
| No | N/A | Limit mode for numeric input: "lowest" (enforce minimum), "highest" (enforce maximum), or "range" (enforce both minimum and maximum). Accepted by the longest form. |
numberIntegersOnly |
| No | N/A | If true, input will be restricted to integers only. Accepted by the longest form. |
LowestValue |
| No | N/A | Minimum value allowed. Defaults to 0 if not specified. Accepted by the longest form. |
HighestValue |
| No | N/A | Maximum value allowed. Defaults to int.MaxValue if not specified. Accepted by the longest form. |
Returns: ProductModifier. A BigCommerce ProductModifier object configured as a numeric input field with required set to true.
Example: ToNumberModifier(true) returns a required numeric field.
When to use it: Use for numeric product inputs such as quantity or measurement; use the longest form to enforce a range or integers only.
ToDateModifier
What it does: Creates a date-input product modifier, optionally with a default date and earliest/latest limits.
Signatures (pick the form with the inputs you need):
ProductModifier ToDateModifier(bool required)ProductModifier ToDateModifier(bool required, string defaultValue)ProductModifier ToDateModifier(bool required, string defaultValue, string dateLimitMode, string dateEarliestValue, string dateLatestValue)
How to call it: ToDateModifier(required)
Parameter | Type | Required | Default | Description |
required |
| Yes | N/A | Indicates whether the date field is mandatory. |
defaultValue |
| No | N/A | The default date value in string format ("yyyy-MM-dd"). Can be null. Accepted by the longer forms. |
dateLimitMode |
| No | N/A | Limit mode for the date input: "earliest" (enforce minimum date), "latest" (enforce maximum date), or "range" (enforce both). Accepted by the longest form. |
dateEarliestValue |
| No | N/A | The earliest acceptable date in string format ("yyyy-MM-dd"). Used when dateLimitMode = "earliest" or "range". Accepted by the longest form. |
dateLatestValue |
| No | N/A | The latest acceptable date in string format ("yyyy-MM-dd"). Used when dateLimitMode = "latest" or "range". Accepted by the longest form. |
Returns: ProductModifier. A BigCommerce ProductModifier object configured as a date input.
Example: ToDateModifier(true) returns a required date field.
When to use it: Use for date inputs on a product; use the longest form to set a default date or restrict the allowed date range.
ToPickListModifier
What it does: Creates a picklist (product-list) modifier from a set of options, optionally with a default selection and pricing, inventory, and shipping behavior per option.
Signatures (pick the form with the inputs you need):
ProductModifier ToPickListModifier(bool required, Dictionary<string, string> optionValues)ProductModifier ToPickListModifier(bool required, string defaultValue, bool productListAdjustsPricing, bool productListAdjustsInventory, string productListShippingCalc, Dictionary<string, string> optionValues)
How to call it: ToPickListModifier(required, optionValues)
Parameter | Type | Required | Default | Description |
required |
| Yes | N/A | Indicates whether the picklist field is mandatory. |
optionValues |
| Yes | N/A | A dictionary containing the picklist options, where the key is the option ID and the value is the display label. |
defaultValue |
| No | N/A | Default option key from the dictionary. Can be null if no default is required. Accepted by the advanced form. |
productListAdjustsPricing |
| No | N/A | Enables pricing adjustments based on the selected option. Accepted by the advanced form. |
productListAdjustsInventory |
| No | N/A | Enables inventory control per option. Accepted by the advanced form. |
productListShippingCalc |
| No | N/A | Shipping calculation mode (e.g., "none", "weight"). Can be null. Accepted by the advanced form. |
Returns: ProductModifier. A BigCommerce ProductModifier object configured as a picklist with the given options.
Example: options { "1": "Small", "2": "Large" } return a required picklist offering Small and Large.
When to use it: Use to offer a list of product options; use the advanced form when the choice should affect pricing, inventory, or shipping.
ToDropDownModifier
What it does: Creates a dropdown product modifier from a list of options, optionally with a default selection and per-option price adjustments.
Signatures (pick the form with the inputs you need):
ProductModifier ToDropDownModifier(bool required, List<string> optionValues)ProductModifier ToDropDownModifier(bool required, string defaultValue, List<string> optionValues)ProductModifier ToDropDownModifier(bool required, string defaultValue, List<string> optionValues, List<decimal> priceModifier)
How to call it: ToDropDownModifier(required, optionValues)
Parameter | Type | Required | Default | Description |
required |
| Yes | N/A | Indicates whether the dropdown field is mandatory. |
optionValues |
| Yes | N/A | A list of option values to display in the dropdown. Each string represents an option label. |
defaultValue |
| No | N/A | The default selected value. Must match one of the provided optionValues. Accepted by the longer forms. |
priceModifier |
| No | N/A | A list of price modifiers corresponding to each option in optionValues. Accepted by the longest form. |
Returns: ProductModifier. A BigCommerce ProductModifier object configured as a dropdown with the given options.
Example: options ["Small", "Medium", "Large"] return a required dropdown offering those three choices.
When to use it: Use for a simple dropdown of choices; use the longest form when each choice should adjust the price.
ToSwatchModifier
What it does: Creates a color/image swatch product modifier from a set of options, optionally with a default selection.
Signatures (pick the form with the inputs you need):
ProductModifier ToSwatchModifier(bool required, Dictionary<string, string> optionValues)ProductModifier ToSwatchModifier(bool required, string defaultValue, Dictionary<string, string> optionValues)
How to call it: ToSwatchModifier(required, optionValues)
Parameter | Type | Required | Default | Description |
required |
| Yes | N/A | Indicates whether the swatch field is mandatory. |
optionValues |
| Yes | N/A | Dictionary of display text (label) mapped to the swatch value (color HEX code or image URL). |
defaultValue |
| No | N/A | The default selected swatch key. Must exist in optionValues. Accepted by the longer form. |
Returns: ProductModifier. A BigCommerce ProductModifier object configured as a swatch with the provided options.
Example: options { "Red": "#FF0000", "Blue": "#0000FF" } return a required swatch offering Red and Blue.
When to use it: Use to present color or image swatches for a product; use the longer form to preselect a default swatch.
ToRadioButtonsModifier
What it does: Creates a radio-buttons product modifier from a list of options, optionally with a default selection.
Signatures (pick the form with the inputs you need):
ProductModifier ToRadioButtonsModifier(bool required, List<string> optionValues)ProductModifier ToRadioButtonsModifier(bool required, string defaultValue, List<string> optionValues)
How to call it: ToRadioButtonsModifier(required, optionValues)
Parameter | Type | Required | Default | Description |
required |
| Yes | N/A | Indicates whether the radio buttons field is mandatory. |
optionValues |
| Yes | N/A | A list of options to render as radio buttons. |
defaultValue |
| No | N/A | The default selected value. Must exist in optionValues. Accepted by the longer form. |
Returns: ProductModifier. A BigCommerce ProductModifier object configured as a radio buttons modifier.
Example: options ["Option A", "Option B"] return a required radio-button group offering those two choices.
When to use it: Use to present a set of mutually exclusive choices as radio buttons; use the longer form to preselect a default.
ToRectangleModifier
What it does: Creates a rectangle (selection box) product modifier from a list of options, optionally with a default selection.
Signatures (pick the form with the inputs you need):
ProductModifier ToRectangleModifier(bool required, List<string> optionValues)ProductModifier ToRectangleModifier(bool required, string defaultValue, List<string> optionValues)
How to call it: ToRectangleModifier(required, optionValues)
Parameter | Type | Required | Default | Description |
required |
| Yes | N/A | Indicates whether the rectangle field is mandatory. |
optionValues |
| Yes | N/A | A list of options to render as rectangles. |
defaultValue |
| No | N/A | The default selected rectangle option. Must exist in optionValues. Accepted by the longer form. |
Returns: ProductModifier. A BigCommerce ProductModifier object configured as a rectangle modifier.
Example: options ["Box A", "Box B"] return a required rectangle selector offering those two choices.
When to use it: Use to present choices as selectable rectangles; use the longer form to preselect a default.
ToChoiceModifier
What it does: Creates a choice-based product modifier of a specified type (such as dropdown, radio buttons, rectangle, or swatch) with a default selection and options, optionally including per-option price adjustments.
Signatures (pick the form with the inputs you need):
ProductModifier ToChoiceModifier(ProductModifier.ProductModifierTypeEnum type, bool required, string defaultValue, List<string> optionValues)ProductModifier ToChoiceModifier(ProductModifier.ProductModifierTypeEnum type, bool required, string defaultValue, Dictionary<string, string> optionValues)ProductModifier ToChoiceModifier(ProductModifier.ProductModifierTypeEnum type, bool required, string defaultValue, List<string> optionValues, List<decimal> priceModifiers)
How to call it: ToChoiceModifier(type, required, defaultValue, optionValues)
Parameter | Type | Required | Default | Description |
type |
| Yes | N/A | The type of the choice modifier (e.g., dropdown, radio buttons, rectangle). |
required |
| Yes | N/A | Indicates whether the modifier field is mandatory. |
defaultValue |
| Yes | N/A | The default selected option. Must exist in optionValues. If not found, the first option is used. |
optionValues |
| Yes | N/A | A list of string options to be rendered in the choice modifier. |
priceModifiers |
| No | N/A | List of price adjustments: either a single value for all options, or one value per option. Accepted by the price-adjustment form. |
Returns: ProductModifier. A BigCommerce ProductModifier object configured with the specified choice options.
Example: creating a dropdown-type choice with options ["Option1", "Option2"] returns a required dropdown modifier offering those choices.
When to use it: Use when you want to build a choice control and specify its type directly, including when options need price adjustments.
ToCheckBoxModifier
What it does: Creates a checkbox product modifier with a label, optionally checked by default.
Signatures (pick the form with the inputs you need):
ProductModifier ToCheckBoxModifier(bool required, string description)ProductModifier ToCheckBoxModifier(bool required, string description, bool isChecked)
How to call it: ToCheckBoxModifier(required, description)
Parameter | Type | Required | Default | Description |
required |
| Yes | N/A | Indicates whether the checkbox is mandatory. |
description |
| Yes | N/A | Label text displayed next to the checkbox. |
isChecked |
| No | N/A | Determines whether the checkbox is checked by default. Accepted by the longer form. |
Returns: ProductModifier. A BigCommerce ProductModifier object configured as a checkbox modifier.
Example: a required checkbox labeled "Accept Terms" returns an unchecked checkbox modifier with that label.
When to use it: Use for yes/no or agreement fields such as accepting terms or opting into a newsletter; use the longer form to pre-check the box.
ToFileUploadModifier
What it does: Creates a file-upload product modifier, either allowing any file type up to a default size or restricting the allowed types and maximum size.
Signatures (pick the form with the inputs you need):
ProductModifier ToFileUploadModifier(bool required)ProductModifier ToFileUploadModifier(bool required, string fileTypesMode, List<string> fileTypesSupported, List<string> fileTypesOther, int fileMaxSize)
How to call it: ToFileUploadModifier(required)
Parameter | Type | Required | Default | Description |
required |
| Yes | N/A | Indicates whether uploading a file is mandatory. |
fileTypesMode |
| No | N/A | Mode for file types: "all" or "specific". Accepted by the longer form. |
fileTypesSupported |
| No | N/A | List of allowed file extensions (e.g., "jpg", "png"). Accepted by the longer form. |
fileTypesOther |
| No | N/A | List of additional file extensions allowed if "other" is specified in fileTypesSupported. Accepted by the longer form. |
fileMaxSize |
| No | N/A | Maximum file size allowed in bytes. Accepted by the longer form. |
Returns: ProductModifier. A BigCommerce ProductModifier object configured as a file upload modifier with default constraints.
Example: ToFileUploadModifier(true) returns a required file-upload field that allows any file type up to 512KB.
When to use it: Use to let customers attach a file to a product; use the longer form to restrict file types or set a size limit.
Categories
Functions for mapping category assignments to BigCommerce.
ConvertCategoriesToBigCommerceIdsAsync
What it does: Converts a set of iPaaS.com product category assignments into the matching BigCommerce category IDs.
Signature: Task<List<int>> ConvertCategoriesToBigCommerceIdsAsync(object categories)
How to call it: await ConvertCategoriesToBigCommerceIdsAsync(categories)
Parameter | Type | Required | Default | Description |
categories |
| Yes | N/A | A generic object containing iPaaS.com product category assignments. |
Returns: List<int>. A list of integer BigCommerce category IDs.
Example: a category assignment for "Apparel" (ID 123) returns [1001].
When to use it: Use in product syncs to map a product's iPaaS.com categories to the matching BigCommerce categories.
Inventory
Functions for determining how a product's inventory is tracked in BigCommerce.
BigCommerceInventoryTrackingType
What it does: Determines the correct BigCommerce inventory tracking setting for an item based on its type and whether it has variants.
Signature: string BigCommerceInventoryTrackingType(string type, object variants)
How to call it: BigCommerceInventoryTrackingType(type, variants)
Parameter | Type | Required | Default | Description |
type |
| Yes | N/A | The item type from iPaaS.com (e.g., "digital", "physical"). |
variants |
| Yes | N/A | An object representing the iPaaS.com item's variants, expected to be a collection. |
Returns: string. "none", "variant", or "product".
Example: a "physical" item with one variant returns "variant".
When to use it: Use when creating or updating a product to set its inventory tracking mode correctly.
Orders and Payments
Functions for interpreting order payments, discounts, and totals.
PaymentMethod
What it does: Determines a standardized payment method label for an order from its payment details and transactions.
Signature: string PaymentMethod(string parentPaymentMethod, string transactionId, List<OrderTransaction> transactions_Data)
How to call it: PaymentMethod(parentPaymentMethod, transactionId, transactions_Data)
Parameter | Type | Required | Default | Description |
parentPaymentMethod |
| Yes | N/A | The general payment method stored at the order level (e.g., "PayPal", "Credit Card"). Used as a fallback when transaction details are missing. |
transactionId |
| Yes | N/A | The unique ID of the BigCommerce order transaction to evaluate (authorization, capture, refund, etc.). |
transactions_Data |
| Yes | N/A | A list of all BigCommerce order transaction records associated with the order. Used to find related details such as credit card type or authorization event. |
Returns: string. "CreditCard-Visa" | "CreditCard-MasterCard" | "PayPal" | "GiftCard" | "ApplePay" | "Other".
Example: an order paid by credit card returns a value such as "CreditCard-Visa".
When to use it: Use for payment reconciliation or reporting where a consistent payment-method label is needed.
CreditCardType
What it does: Returns the credit card type used on an order (such as Visa or MasterCard), optionally falling back to a supplied payment method when no card details are present.
Signatures (pick the form with the inputs you need):
string CreditCardType(List<BigCommerce.v3.DataModels.OrderTransaction> orderTransactions)string CreditCardType(List<BigCommerce.v3.DataModels.OrderTransaction> orderTransactions, string paymentMethod)
How to call it: CreditCardType(orderTransactions)
Parameter | Type | Required | Default | Description |
orderTransactions |
| Yes | N/A | A list of transaction records associated with the BigCommerce order. |
paymentMethod |
| No | N/A | A fallback string representing the parent-level payment method (e.g., "PayPal", "Manual"). Accepted by the longer form. |
Returns: string. "Visa", "MasterCard", etc. if credit card data exists, otherwise "" (empty string).
Example: an order's transactions return "Visa" when a Visa payment is present.
When to use it: Use to record or report the card type on an order; use the longer form to fall back to the order's payment method for non-card payments.
CreditCardAuthIsCaptured
What it does: Determines whether a credit card authorization has a matching capture, indicating the payment was captured.
Signature: bool CreditCardAuthIsCaptured(string gatewayTransactionId, List<OrderTransaction> transactions_Data)
How to call it: CreditCardAuthIsCaptured(gatewayTransactionId, transactions_Data)
Parameter | Type | Required | Default | Description |
gatewayTransactionId |
| Yes | N/A | The payment gateway transaction ID of the authorization to check. Can be a raw ID or a formatted ID with metadata. |
transactions_Data |
| Yes | N/A | A list of BigCommerce order transaction objects associated with the order, used to search for a capture event. |
Returns: bool. True if a capture event exists for the given authorization; otherwise false.
Example: an authorization with a matching capture returns true.
When to use it: Use to confirm whether an authorized card payment has been captured before acting on it.
ProductSoldTotal
What it does: Adds up the pre-tax total of all non-gift-card products in an order.
Signature: decimal ProductSoldTotal(List<OrderProduct> products_Data)
How to call it: ProductSoldTotal(products_Data)
Parameter | Type | Required | Default | Description |
products_Data |
| Yes | N/A | A list of BigCommerce OrderProduct objects representing all products in the order. |
Returns: decimal. The total decimal amount for non-gift card products (excluding tax).
Example: an order with a $49.99 physical item and a $25.00 gift card returns 49.99.
When to use it: Use in sales or accounting mappings where gift cards should be excluded from product revenue.
ProductSoldCount
What it does: Adds up the quantity of all non-gift-card products in an order.
Signature: decimal ProductSoldCount(List<OrderProduct> products_Data)
How to call it: ProductSoldCount(products_Data)
Parameter | Type | Required | Default | Description |
products_Data |
| Yes | N/A | A list of BigCommerce OrderProduct objects representing items in an order. |
Returns: decimal. The total quantity of non-gift card order lines.
Example: an order with two physical units and one gift card returns 2.
When to use it: Use to count the units of actual products sold, excluding gift cards.
RequiresDepositTicket
What it does: Determines whether an order requires a deposit ticket. One form checks the transactions for gift certificates or captured card payments; the other checks whether the order contains any non-gift-card products.
Signatures (pick the form with the inputs you need):
bool RequiresDepositTicket(List<OrderTransaction> transactions_Data)bool RequiresDepositTicket(List<OrderTransaction> transactions_Data, List<OrderProduct> products_Data)
How to call it: RequiresDepositTicket(transactions_Data)
Parameter | Type | Required | Default | Description |
transactions_Data |
| Yes | N/A | A list of BigCommerce OrderTransaction objects representing the transactions of an order. Each object may contain details like Method, Amount, Event, and CreditCard flag. |
products_Data |
| No | N/A | A list of BigCommerce OrderProduct objects representing products in the order. Used to determine whether non-gift card items are present. Accepted by the longer form. |
Returns: bool. True when a gift certificate or captured/purchased credit card transaction exists; otherwise false.
Example: an order with a captured credit card payment and a physical product returns true.
When to use it: Use in accounting or settlement workflows to decide whether to create a deposit ticket for an order.
ContainsHeaderCouponDiscount
What it does: Determines whether an order-level coupon of a given type and code has been applied to the order.
Signature: bool ContainsHeaderCouponDiscount(List<OrderProduct> products, int type, string code)
How to call it: ContainsHeaderCouponDiscount(products, type, code)
Parameter | Type | Required | Default | Description |
products |
| Yes | N/A | List of BigCommerce OrderProduct objects representing the products in the order, each potentially containing applied discounts. |
type |
| Yes | N/A | Integer representing the coupon type. 2 = header-level always applied; 5 = check line items for order-level discount. |
code |
| Yes | N/A | The BigCommerce coupon code to match against applied discounts. |
Returns: bool. Whether a header-level coupon discount matching the type and code exists.
Example: with type 5 and code "SAVE10", an order carrying a matching order-level discount returns true.
When to use it: Use to check whether a specific order-level coupon has been applied when mapping order discounts.
ContainsHeaderPromoDiscounts
What it does: Determines whether an automatic (non-coupon) order-level promotional discount has been applied.
Signature: bool ContainsHeaderPromoDiscounts(List<OrderProduct> products)
How to call it: ContainsHeaderPromoDiscounts(products)
Parameter | Type | Required | Default | Description |
products |
| Yes | N/A | List of BigCommerce OrderProduct objects representing the line items in the order, each potentially containing applied discounts. |
Returns: bool. Whether an automatic header-level promo discount is applied.
Example: an order carrying an automatic order-level discount returns true.
When to use it: Use to detect automatically applied order-level promotions when mapping order discounts.
SumHeaderPromoDiscounts
What it does: Adds up the total of all automatic (non-coupon) order-level promotional discounts on an order.
Signature: decimal SumHeaderPromoDiscounts(List<OrderProduct> products)
How to call it: SumHeaderPromoDiscounts(products)
Parameter | Type | Required | Default | Description |
products |
| Yes | N/A | List of BigCommerce OrderProduct objects representing the line items in the order, each potentially containing applied discounts. |
Returns: decimal. The total automatic header-level discount.
Example: an order with automatic order-level discounts of $5.00 and $2.50 returns 7.50.
When to use it: Use to total automatically applied order-level promotions when mapping order discounts.
GetProductOptionsFromCustomFields
What it does: Builds a list of order product options by matching a custom field value (such as a selling unit) on an order line to the corresponding product or variant option in BigCommerce.
Signature: Task<List<OrderProductOption>> GetProductOptionsFromCustomFields(object customFields, string sku, string unitCustomFieldName)
How to call it: await GetProductOptionsFromCustomFields(customFields, sku, unitCustomFieldName)
Parameter | Type | Required | Default | Description |
customFields |
| Yes | N/A | The iPaaS.com custom field object (a list of custom-field name/value pairs) from the source record being mapped. |
sku |
| Yes | N/A | The SKU used to fetch the target product from BigCommerce. |
unitCustomFieldName |
| Yes | N/A | The custom field name (e.g. "SellingUnit"). |
Returns: List<OrderProductOption>. Matched BigCommerce product or variant options derived from custom fields.
Example: a "SellingUnit" of "DOZ" on SKU "TOP-XLL" returns the matching option (Unit = DOZ).
When to use it: Use when creating orders where a custom field such as a selling unit must map to a BigCommerce product option.
Gift Cards
Functions for identifying and totaling gift card items and redemptions on an order.
GiftCardNumber
What it does: Returns the gift card number from an order's transactions by finding the first gift certificate payment.
Signature: string GiftCardNumber(List<BigCommerce.v3.DataModels.OrderTransaction> orderTransactions)
How to call it: GiftCardNumber(orderTransactions)
Parameter | Type | Required | Default | Description |
orderTransactions |
| Yes | N/A | A list of BigCommerce order transaction objects associated with the order. |
Returns: string. The gift card number (an iPaaS.com identifier) as a string, or an empty string if no valid gift certificate is found.
Example: an order whose transactions include a gift certificate valued "GC-123456" returns "GC-123456".
When to use it: Use to capture the gift card number applied to an order for tracking gift card redemption.
GiftCardSoldTotal
What it does: Adds up the pre-tax total of all gift card items in an order.
Signature: decimal GiftCardSoldTotal(List<OrderProduct> products_Data)
How to call it: GiftCardSoldTotal(products_Data)
Parameter | Type | Required | Default | Description |
products_Data |
| Yes | N/A | A list of BigCommerce OrderProduct objects representing all products in the order. |
Returns: decimal. The total sum of all gift card items (excluding tax).
Example: an order with a $25.00 gift card returns 25.00.
When to use it: Use to total gift card sales within an order for reporting or accounting.
GiftCardSoldCount
What it does: Counts the number of gift card order lines in an order.
Signature: decimal GiftCardSoldCount(List<OrderProduct> products_Data)
How to call it: GiftCardSoldCount(products_Data)
Parameter | Type | Required | Default | Description |
products_Data |
| Yes | N/A | A list of BigCommerce OrderProduct objects representing items in an order. |
Returns: decimal. The total number of gift certificate order lines.
Example: an order with one gift card line and one physical item returns 1.
When to use it: Use to report how many gift cards were sold in an order.
GiftCardRedeemedTotal
What it does: Adds up the total amount redeemed through gift card payments on an order.
Signature: decimal GiftCardRedeemedTotal(List<OrderTransaction> transactions_Data)
How to call it: GiftCardRedeemedTotal(transactions_Data)
Parameter | Type | Required | Default | Description |
transactions_Data |
| Yes | N/A | A list of BigCommerce OrderTransaction objects representing the transactions for an order. Each transaction may have details such as Method, Amount, Event, and CreditCard flag. |
Returns: decimal. The total redeemed amount from all gift card transactions.
Example: an order with two gift card redemptions of $25.00 and $50.00 returns 75.00.
When to use it: Use to total gift card redemptions for reconciliation or reporting.
RequiresGiftCardTicket
What it does: Determines whether an order contains a gift card item and therefore requires a gift card ticket.
Signature: bool RequiresGiftCardTicket(List<OrderProduct> products_Data)
How to call it: RequiresGiftCardTicket(products_Data)
Parameter | Type | Required | Default | Description |
products_Data |
| Yes | N/A | A list of BigCommerce OrderProduct objects representing the products included in an order. Each product has details such as Type, Quantity, Price, etc. |
Returns: bool. True if any product is of type "giftcertificate"; otherwise false.
Example: an order containing a gift certificate and a physical item returns true.
When to use it: Use when gift card items require separate processing or fulfillment from other goods.
Shipping and Fulfillment
Functions for building shipment data and locating shipping details on a BigCommerce order.
BigCommerceShipmentItemsAsync
What it does: Builds the list of shipment items for a BigCommerce order from iPaaS.com transaction lines, matching each SKU to the order's products and splitting quantities across order products when needed. An optional unit field lets it match SKUs that carry a selling unit.
Signature: Task<List<BigCommerce.v3.DataModels.ShipmentItem>> BigCommerceShipmentItemsAsync(string originalOrderId, object transactionLines, string unitFieldName = null)
How to call it: await BigCommerceShipmentItemsAsync(originalOrderId, transactionLines)
Parameter | Type | Required | Default | Description |
originalOrderId |
| Yes | N/A | The ID of the original BigCommerce order, typically retrieved via an external ID mapping. |
transactionLines |
| Yes | N/A | A collection of transaction line objects (from iPaaS.com) containing SKU and quantity information. |
unitFieldName |
| No |
| The unit of the sku e.g DOZ. |
Returns: List<BigCommerce.v3.DataModels.ShipmentItem>. The BigCommerce-formatted shipment item list.
Example: a transaction line for SKU "TOP-XLL", quantity 2, returns the matching order product's shipment items.
When to use it: Use when creating a BigCommerce shipment to build its line items from the order's transaction lines.
BigCommerceShipmentAllocateItemsAsync
What it does: Allocates an order's transaction line items across multiple tracking numbers, returning the items that belong to the tracking number currently being processed.
Signature: Task<List<BigCommerce.v3.DataModels.ShipmentItem>> BigCommerceShipmentAllocateItemsAsync(string originalOrderId, object transactionLines, string currentTrackingId, object trackingNumbers)
How to call it: await BigCommerceShipmentAllocateItemsAsync(originalOrderId, transactionLines, currentTrackingId, trackingNumbers)
Parameter | Type | Required | Default | Description |
originalOrderId |
| Yes | N/A | The ID of the original BigCommerce order, typically retrieved via an external ID mapping. |
transactionLines |
| Yes | N/A | A collection of transaction line objects (from iPaaS.com), each containing SKU and quantity. |
currentTrackingId |
| Yes | N/A | The unique ID of the currently processed iPaaS.com tracking number. |
trackingNumbers |
| Yes | N/A | A collection of tracking number objects (from iPaaS.com). |
Returns: List<BigCommerce.v3.DataModels.ShipmentItem>. The BigCommerce-formatted shipment item list.
Example: for the last tracking number, all remaining items from its position onward are returned; otherwise only the item at that position is returned.
When to use it: Use when splitting an order's items across multiple shipments, one per tracking number.
BigCommerceFirstShipmentIdAsync
What it does: Returns the first shipping address ID for a BigCommerce order, which is needed when creating a shipment.
Signature: Task<string> BigCommerceFirstShipmentIdAsync(string originalOrderId)
How to call it: await BigCommerceFirstShipmentIdAsync(originalOrderId)
Parameter | Type | Required | Default | Description |
originalOrderId |
| Yes | N/A | The ID of the BigCommerce order (as a string), typically obtained through external ID mapping. |
Returns: string. The first BigCommerce shipping address ID, or null if no addresses exist.
Example: order "125" returns "13".
When to use it: Use when creating a shipment that needs the order's shipping address ID. Only the first address is used.
Customers
Functions for matching customers and configuring customer group pricing and access.
GetCustomerGroupIdByCategories
What it does: Returns the BigCommerce customer group ID that corresponds to a set of iPaaS.com customer categories, using the first category flagged as a customer pricing group.
Signature: Task<object> GetCustomerGroupIdByCategories(object categories)
How to call it: await GetCustomerGroupIdByCategories(categories)
Parameter | Type | Required | Default | Description |
categories |
| Yes | N/A | An object containing customer categories assigned to customers in iPaaS.com. |
Returns: object. The BigCommerce customer group ID for the first matching group, based on the iPaaS.com customer categories whose 'Customer Pricing Group' custom field is true.
Example: a set of iPaaS.com customer categories returns the matching customer group's ID.
When to use it: Use when syncing customers to assign them to the correct BigCommerce customer group based on their categories.
CustomerGroupExistInPriceList
What it does: Checks whether a BigCommerce customer group is linked to a price list.
Signature: Task<bool> CustomerGroupExistInPriceList(string customerGroupId = null)
How to call it: await CustomerGroupExistInPriceList(customerGroupId)
Parameter | Type | Required | Default | Description |
customerGroupId |
| No |
| The ID of the BigCommerce customer group to check. If null or empty, the method assumes the group exists and returns true. |
Returns: bool. True when the group exists or the id is null/empty; false when the group is valid but has no associated price list.
Example: "123" returns true when that group has a price list.
When to use it: Use to confirm that pricing exists for a customer group before syncing related orders or customers.
SetCategoryAccessForCustomerGroup
What it does: Builds the category access rules for a customer group: access to all categories, none, or only specific ones.
Signature: CategoryAccess SetCategoryAccessForCustomerGroup(string type, long[] categoryIds = null)
How to call it: SetCategoryAccessForCustomerGroup(type, categoryIds)
Parameter | Type | Required | Default | Description |
type |
| Yes | N/A | Defines the type of category access. Allowed values: "all", "specific", "none". |
categoryIds |
| No |
| An array of BigCommerce category IDs required only if type = "specific". |
Returns: CategoryAccess. The configured BigCommerce category access rules.
Example: a type of "all" returns a category access object granting access to all categories.
When to use it: Use when assigning category access rules to a BigCommerce customer group.
SetDiscountRulesForCustomerGroup
What it does: Builds the discount rules for a customer group, linking it to a price list.
Signature: List<DiscountRules> SetDiscountRulesForCustomerGroup(string type, long priceListId)
How to call it: SetDiscountRulesForCustomerGroup(type, priceListId)
Parameter | Type | Required | Default | Description |
type |
| Yes | N/A | Defines the type of discount rule. Allowed value: "price_list". |
priceListId |
| Yes | N/A | A valid BigCommerce price list ID (> 0). Used to link a customer group with a price list. |
Returns: List<DiscountRules>. The configured BigCommerce discount rule, or null if invalid inputs are provided.
Example: a type of "price_list" with price list ID 5001 returns the configured discount rule.
When to use it: Use when assigning price-list-based pricing rules to a BigCommerce customer group.
MatchCustomerByEmailAsync
What it does: Looks up a BigCommerce customer by email address and returns their customer ID.
Signature: Task<string> MatchCustomerByEmailAsync(string emailAddress)
How to call it: await MatchCustomerByEmailAsync(emailAddress)
Parameter | Type | Required | Default | Description |
emailAddress |
| Yes | N/A | The email address of the customer to search for in BigCommerce. |
Returns: string. The BigCommerce customer ID if found, otherwise null.
Example: "john.doe@example.com" returns the matching customer's ID, or null if none matches.
When to use it: Use to find an existing BigCommerce customer by email, for example, to avoid creating duplicates.
B2B
Functions for BigCommerce B2B Edition: matching B2B customers and companies and mapping company data.
MatchB2BCustomerByEmailAsync
What it does: Looks up a BigCommerce B2B customer by email address and returns their B2B customer ID.
Signature: Task<string> MatchB2BCustomerByEmailAsync(string emailAddress)
How to call it: await MatchB2BCustomerByEmailAsync(emailAddress)
Parameter | Type | Required | Default | Description |
emailAddress |
| Yes | N/A | The email address of the B2B customer to search for in BigCommerce. |
Returns: string. The BigCommerce B2B customer ID if found, or null if no match exists.
Example: "b2b.customer@example.com" returns "149" when a matching B2B customer exists.
When to use it: Use to find an existing B2B customer by email during a B2B customer sync.
ConvertB2BCompany
What it does: Returns the email address on file for a BigCommerce B2B company, given its company ID.
Signature: Task<string> ConvertB2BCompany(object companyId)
How to call it: await ConvertB2BCompany(companyId)
Parameter | Type | Required | Default | Description |
companyId |
| Yes | N/A | The company ID for which the email address should be retrieved from BigCommerce. |
Returns: string. The email address of the BigCommerce B2B company, or an empty string if not found.
Example: company 150 returns "company@example.com" when the company exists.
When to use it: Use when syncing B2B companies and you need the company's email address from its ID.
GetValueFromExtraField
What it does: Returns the value of a named custom (extra) field from a collection of extra fields.
Signature: Task<object> GetValueFromExtraField(object extraFieldObj, object textFieldName)
How to call it: await GetValueFromExtraField(extraFieldObj, textFieldName)
Parameter | Type | Required | Default | Description |
extraFieldObj |
| Yes | N/A | The collection of extra fields, typically coming from an iPaaS.com source or external model. |
textFieldName |
| Yes | N/A | The name of the custom field to retrieve. This will be normalized for consistent lookup. |
Returns: object. The value of the requested custom field, or null if not found.
Example: requesting "AccountType" returns "Wholesale" when that extra field exists.
When to use it: Use to pull a specific custom field value out of a set of extra fields for mapping.
GetiPaaSCompany
What it does: Checks whether a company with the given ID exists in your iPaaS.com data.
Signature: Task<bool> GetiPaaSCompany(object companyId)
How to call it: await GetiPaaSCompany(companyId)
Parameter | Type | Required | Default | Description |
companyId |
| Yes | N/A | The company ID to check in the iPaaS.com system. |
Returns: bool. Whether the company exists in iPaaS.com.
Example: company "8423326" returns true when the company exists.
When to use it: Use to confirm a company exists in iPaaS.com before updating it or linking records to it.
ConvertB2BCompanyStatusToId
What it does: Converts a BigCommerce B2B company status name into its status ID.
Signature: string? ConvertB2BCompanyStatusToId(object companyStatus)
How to call it: ConvertB2BCompanyStatusToId(companyStatus)
Parameter | Type | Required | Default | Description |
companyStatus |
| Yes | N/A | The BigCommerce B2B company status name to convert (e.g., "Approved", "Pending"). |
Returns: string?. The BigCommerce B2B company status ID, or null if the status name is invalid or not recognized.
Example: "Approved" returns "1".
When to use it: Use when mapping a B2B company's status to the ID BigCommerce expects.
GetB2BOrderIdByBCOrderId
What it does: Returns the B2B order ID that corresponds to a given BigCommerce order ID.
Signature: Task<long> GetB2BOrderIdByBCOrderId(object bcOrderId)
How to call it: await GetB2BOrderIdByBCOrderId(bcOrderId)
Parameter | Type | Required | Default | Description |
bcOrderId |
| Yes | N/A | The BigCommerce order ID used to fetch the corresponding B2B order record from the internal system. |
Returns: long. The BigCommerce B2B order ID if found; otherwise 0.
Example: BigCommerce order 1452 returns the matching B2B order ID, or 0 when none exists.
When to use it: Use when mapping or synchronizing BigCommerce orders with their B2B order records.
Other
General-purpose helpers for sites, channels, and custom field data.
SiteIdFromChannelId
What it does: Returns the BigCommerce site ID associated with a given channel ID.
Signature: Task<int?> SiteIdFromChannelId(int channelId)
How to call it: await SiteIdFromChannelId(channelId)
Parameter | Type | Required | Default | Description |
channelId |
| Yes | N/A | The integer identifier of the BigCommerce channel for which the corresponding Site ID should be fetched. |
Returns: int?. The BigCommerce Site ID for the provided channelId, or null if not found.
Example: channel 23 returns 45 when that channel is mapped to a site.
When to use it: Use when you need a channel's associated site ID for multi-storefront or channel-based mappings.
SiteIdFromChannelUrl
What it does: Returns the BigCommerce site ID whose URL matches a given channel URL.
Signature: Task<int?> SiteIdFromChannelUrl(string channelUrl)
How to call it: await SiteIdFromChannelUrl(channelUrl)
Parameter | Type | Required | Default | Description |
channelUrl |
| Yes | N/A | The full BigCommerce Channel URL (e.g., "https://redrook.mybigcommerce.com") used to find the matching site. |
Returns: int?. The BigCommerce Site ID for the provided channelUrl, or null if not found.
Example: "https://redrook.mybigcommerce.com" returns 45 when that URL is mapped to a site.
When to use it: Use when you have a storefront URL and need its associated site ID.
GetDictionaryForCustomFields
What it does: Converts a JSON array of custom fields into a set of key/value pairs, using the property names you choose for the key and the value.
Signature: Task<object> GetDictionaryForCustomFields(string attributes, string key, string value)
How to call it: await GetDictionaryForCustomFields(attributes, key, value)
Parameter | Type | Required | Default | Description |
attributes |
| Yes | N/A | JSON string representing custom fields. |
key |
| Yes | N/A | Property name in each JSON object to use as the dictionary key. |
value |
| Yes | N/A | Property name in each JSON object to use as the dictionary value. |
Returns: object. A dictionary of the requested key/value pairs.
Example: a JSON array with name/content pairs returns { "Size": "7", "Brand": "Nike" }.
When to use it: Use to turn a JSON list of custom fields into a lookup of name-to-value pairs for further mapping.
