Overview
The Claude integration provides two ready-made functions you can call when building mappings. They read the result of the Claude call made for a record, such as which fields Claude changed or what Claude wrote to a custom field, so your write-back mappings can take Claude's answer without you writing that logic yourself.
Where you can use these functions
These functions are available anywhere you write a formula for the Claude 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:
ClaudeCustomField(ClaudeCustomFields, "Claude Segment").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.
These functions are synchronous, so you call them directly (no
awaitis required).Each function runs at sync time, when the write-back TO iPaaS.com is mapped, and reads only the result of the Claude call already made for that record.
The functions are grouped below by the area of the integration they support.
Writing Claude's answer back TO iPaaS.com
Use these in the mappings that write Claude's answer back TO iPaaS.com. After Claude answers, the integration puts two result fields on the record it writes back: ClaudeChangedFields (the fields Claude changed) and ClaudeCustomFields (the custom fields Claude wrote), and these functions read them. In a FROM iPaaS.com mapping the source is the iPaaS.com record, which does not carry these fields, so there is nothing for the functions to read there. The functions make no call to Claude and add no cost. The example TO iPaaS.com collections already use both; you need them yourself when you add a custom field for Claude to fill, when you add a field to AllowedFields that the write-back does not map yet, or when you build a write-back collection of your own.
ClaudeChanged
What it does: Tells you whether Claude changed one field of the record, so a write-back TO iPaaS.com can take Claude's value for that field and keep the current iPaaS.com value of every field Claude did not change.
Signature: bool ClaudeChanged(string claudeChangedFields, string field)
How to call it: ClaudeChanged(ClaudeChangedFields, "Description")
Parameter | Type | Required | Default | Description |
claudeChangedFields |
| Yes | N/A | The record's ClaudeChangedFields result field, which the Claude integration fills after Claude answers: the names of the record fields Claude changed, separated by commas (for example |
field |
| Yes | N/A | The name of the iPaaS.com record field to check, for example |
Returns: bool. True when Claude changed that field for this record; false when it did not, when ClaudeChangedFields is empty, or when the field name is empty. The function never raises an error.
Example: When ClaudeChangedFields is description, ClaudeChanged(ClaudeChangedFields, "Description") returns true and ClaudeChanged(ClaudeChangedFields, "Name") returns false.
When to use it: Use it in every write-back mapping of a field Claude may change. An update TO iPaaS.com replaces the whole record, so a mapping that wrote back the record exactly as it was sent to Claude would empty a field you stopped sending to Claude and undo a change made in iPaaS.com while Claude was answering. The example write-back collections map each such field with this pattern, shown here for Description: return ClaudeChanged(ClaudeChangedFields, "Description") ? (object)Description : (DestinationValue != null ? (object)DestinationValue.Description : null);. It reads: if Claude changed the description, write Claude's description; otherwise write the description the record has in iPaaS.com now. When you add a field to AllowedFields and the write-back does not map it yet, add a mapping for that field in the same pattern, replacing Description with the field's name in all three places. When the record cannot be read in iPaaS.com at write-back time, the pattern returns no value for the fields Claude did not change.
ClaudeCustomField
What it does: Returns the value Claude wrote to one custom field, so a write-back mapping TO iPaaS.com can put it into the iPaaS.com custom field of your choice.
Signature: string ClaudeCustomField(string claudeCustomFields, string name)
How to call it: ClaudeCustomField(ClaudeCustomFields, "Claude Segment")
Parameter | Type | Required | Default | Description |
claudeCustomFields |
| Yes | N/A | The record's ClaudeCustomFields result field, which the Claude integration fills after Claude answers: every custom field Claude wrote for this record, by name, as JSON (for example |
name |
| Yes | N/A | The name of the custom field as your Prompt names it, for example |
Returns: string. The value Claude wrote to that custom field, as text, exactly as Claude wrote it (a date such as 2026-01-02T10:00:00Z is returned unchanged). Returns null when Claude did not write that custom field for this record, when ClaudeCustomFields is empty or does not hold Claude's result, or when the name is empty. The function never raises an error.
Example: When ClaudeCustomFields is {"Claude Segment":"Wholesale"}, ClaudeCustomField(ClaudeCustomFields, "Claude Segment") returns "Wholesale", and ClaudeCustomField(ClaudeCustomFields, "Claude Risk") returns null.
When to use it: Use it to save a custom field Claude writes. Claude is instructed to write a custom field only when your Prompt names it, and a write-back mapping that reads it puts the value into the iPaaS.com custom field. The example write-back collections read Claude Segment (Customer), Claude Industry (Customer Company), Claude Variant Label (Product Variant) and Claude Risk (Transaction) this way, for example return ClaudeCustomField(ClaudeCustomFields, "Claude Segment"); mapped to the iPaaS.com custom field Claude Segment. To add your own, for example an SEO title for products: create the custom field (for example SEO Title) for the data type in your iPaaS.com company; in the FROM iPaaS.com collection, name it in the Prompt (for example "write a page title of at most 60 characters to the custom field SEO Title"); then in the TO iPaaS.com write-back collection add a Dynamic Formula mapping to that custom field: return ClaudeCustomField(ClaudeCustomFields, "SEO Title");. Check the spelling against the Prompt when a value does not arrive. Subscribers or their MiSP should validate in a staging subscription how the write-back treats a custom field for which the function returns no value before relying on it in production.
Related Documents
Claude Background
Claude Installation Instructions
Claude Connections and Settings
Claude Error Messages
Claude Known Limitations
