Ampersand supports object mapping and field mapping. This allows you to either pre-define a set of mappings, or prompt your users to define their own mappings via Ampersand’s UI components.Documentation Index
Fetch the complete documentation index at: https://ampersand-24eb5c1a-feat-acculynx-docs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Predefined mapping
Object mapping
You can map an object from a provider API to a label of your choice. This can help you with any naming/semantic conventions that you need, or even help you build a unified API across different API providers. For example, if you map theaccount object from Salesforce and the companies object from HubSpot to a unified label like company, your read action results will be delivered under the object name of company. The original object name will still be available in the response’s rawObjectName key.
If you wish to write data to company, you can inherit the mapping from the read action.
Here’s an example of a Salesforce integration that maps the account object to company:
Field mapping
You can map individual fields to labels of your choosing. This can help you enforce naming conventions, or standardize field names across API providers. For example, you could map amobilephone field to phone. Read results will deliver the field under the phone key, and when you make a call to the Write API, you can use phone to update the original mobilePhone field if the write action inherits the mapping.
User-defined mapping
User-defined mappings allow your end users (or consumers, in Ampersand terminology) to define mappings. Currently, only user-defined field mappings are supported, not object mappings yet.Field mapping
Your end users may have a custom field to add notes to an Account object. You can ask your consumers to define this mapping at the time of installation, and receive data across different consumers under a single unified field likenotes.
Example:
- You define a
notesfield in your integration. - User A stores notes in
field_a, while User B usesfield_b. - The UI library will ask each user to identify which field to map, and Ampersand delivers them under
notes, accommodating custom fields unique to each consumer. - You can write back to each user’s specific fields by writing to the
notesfield, if you inherit the mapping.
requiredFields or optionalFields, you’ll specify:
- mapToName: when Ampersand delivers the data from this field to you, this is the name that will be used to identify the field.
- mapToDisplayName: the text to display to the user in the UI component when asking them to select a field.
- default (optional): the default field, you should only use standard fields as defaults.
- prompt (optional): additional context that you want to show your user in the UI Component about this field, in a tooltip.
notes populated, and Ampersand will automatically strip it from the request before writing to the provider API to prevent errors.
Dynamic field mappings
With regular field mappings, you can define a set of fields that all your users need to map. Sometimes, you may want different users to map different sets of fields.For example: SampleApp is using Ampersand to integrate with their customer’s HubSpot. SampleApp needs to ask the customer to map their SampleApp fields to their HubSpot fields, and different customers can have different sets of fields in SampleApp.To achieve this, you can pass in the mapping configuration in the
fieldMapping property of the InstallIntegration component:
amp.yaml):
amp.yaml) and dynamically mapped fields (defined in the UI component) will be present in result.mappedFields
Mapping values
Ampersand platform also offers the flexibility of mapping values of fields from your app to a provider like HubSpot. These might be for fields that are mapped either in a user-defined fashion or have a pre-defined mapping defined. Lets take an example:- SampleApp is using Ampersand to integrate with their customer’s HubSpot.
- SampleApp needs to ask the customer to map their SampleApp fields to their HubSpot fields.
- For a certain field, such as
Priority, SampleApp has the valuesVery High,High,Medium,Lowwhile HubSpot has the valuesP1,P2,P3, andP4. SampleApp would like the user to map the correlation between the SampleApp values and HubSpot values.
InstallIntegration component like below:
Nested field mapping
Some provider APIs may have nested structures. Ampersand supports mapping from and to nested fields using JSONPath’s bracket notation, allowing you to extract values from nested objects or write values into nested structures. Nested field paths use the format$['parentField']['childField']. Bracket notation ensures that field names containing dots, spaces, or other special characters are correctly parsed. For example, $['parentField']['childField$With.Special"Characters"'] is valid.
Value mappings also support bracket notation.
When you call the Get Object Metadata API, some providers may return nested fields such as
$['parentField']['childField']. These field names can be used directly in your amp.yaml configuration.Reading nested data
When a provider API returns nested data, you can use field mappings to extract nested values into mapped fields. Here is an example: Provider returns:amp.yaml:

