Datatalks API: Configuring mappings

There are the following types of field that we currently support on our side:

  • String
  • List
  • Dynamic

Mapping for a string field

The mapping for a String field is straight-forward. The field in the integration will correspond exactly to the field in your data and get its value.

Mapping for a List field

The mapping for a List field is similar to the mapping for a String field - it is mapped directly to the field in your data. The difference is that the value in your data must be an array/list.

Mapping for a Dynamic field

The Dynamic fields in our integrations may be mapped to more than one of the fields in your data. This means that the relation is 1 to many. Your fields will be mapped and their values will be transformed via templates, so they match the requirements of the integration.

For example, let's take the Salesmanago contacts integration. The upserting of contacts supports the following field:

{
	"properties": {
		"prop1": "value1",
		"prop2": "value2"
	}
}

If you send us the following data:

{
	"data": {
		"school": "Some School",
		"teacher": "John Doe"
	},
	"group_key": "abc123"
}

You need to specify that both the school and teacher fields are going to be mapped to the properties field, and also provide the name of the keys you want to have inside the properties fields. This will allow us to forward your data as the following:

{
	"properties": {
		"School": "Some School",
		"Teacher": "John Doe"
	}
}