- Documentation
- User Application
- Integrations
- Apps and databases connector
Data mapping and conversions
When a Salesforce connector reads a record, it copies the values into the form fields almost as Salesforce returns them. To show a value in another way, for example a date as 28/02/2022 or an amount as 123,456.70, map it with a formula. When a connector writes to Salesforce, Cellosign converts the dates of the form to the Salesforce format and sends the other values as they are.
Values read from Salesforce
Section titled “Values read from Salesforce”In the Field Mapping of a PRESET or LIVE connector, Source DB Column copies the field of the record as follows:
| Salesforce field type | What the form field gets |
|---|---|
| Text, text area, email, phone, URL | The text as it is. |
| Picklist, multi-select picklist | The label of the value, as the Salesforce user of the connection sees it, and not its API name. A multi-select picklist gives the labels separated by ;. |
| Number, currency, percent | The number as Salesforce returns it, with . for decimals and without thousands separators, for example 1500.0. |
| Checkbox | true or false. |
| Date | yyyy-mm-dd, for example 2022-02-28. |
| Date/time | The date and time in ISO 8601 format, moved from UTC to the time zone of the Cellosign environment, for example 2022-02-28T23:35:00+02:00. |
| ID, lookup relationship | The Salesforce ID of the record. |
| No value | Empty. |
Map each value to a form field of a suitable type, especially when the client can edit it. For example, map a date to a Date field, with Date format in the format of the field, so that the client sees and edits the date in one format.
Format values with a formula
Section titled “Format values with a formula”- In the mapping row, select Formula in Source, and click the function button. The Formula Builder opens.
- Click Add Rule, select DB Column, and select the field of the object.
- Select the operation. As is copies the value. For number fields, you can select Ceil (round up), Floor (round down) or Currency format, and for date and date/time fields Date format. For Currency format and Date format, select the format.
- Add more rules as needed, and click Save.
The Formula Builder works as in the field settings, with CONCAT, REPEAT, CALC and the Form Field and Fixed Value sources. See Formula Builder. The DB Column source is available only in Salesforce connectors.
Number operations
Section titled “Number operations”| Operation | Result | Examples |
|---|---|---|
| Ceil (round up) | Rounds up to a whole number. | 1.1 → 2, -7.004 → -7 |
| Floor (round down) | Rounds down to a whole number. | 1.1 → 1, -7.004 → -8 |
| Currency format, with two decimals | Thousands separators and two decimals. | 123456.789 → 123,456.79 |
| Currency format, whole number | Rounds to a whole number, with thousands separators. | 123456.7 → 123,457 |
The result is a text, so it can fill a Text field.
Date formats
Section titled “Date formats”| Format | Result |
|---|---|
| dd/mm/yyyy | 28/02/2022 |
| mm/dd/yyyy | 02/28/2022 |
| dd MMM yyyy | 28 Feb 2022 |
| dd/mm/yyyy hh:mm | 28/02/2022 23:35 |
| mm/dd/yyyy hh:mm, 12-hour | 02/28/2022 11:35 PM |
| dd MMM yyyy hh:mm | 28 Feb 2022 23:35 |
| dd MMM yyyy hh:mm, 12-hour | 28 Feb 2022 11:35 PM |
The name of the month is in the language of the project. An empty date gives an empty result. A date/time is shown in the time zone of the Cellosign environment.
Combine values
Section titled “Combine values”| Group | Example | Result |
|---|---|---|
| CONCAT | The rules First Name, a Fixed Value with a space, and Last Name | Dana Tidewell |
| REPEAT | The same rules, with the Delimiter , |
Dana Tidewell, Noa Tidewell, for all the contacts that the query found |
| CALC | Multiply (×) of Amount and a Fixed Value 1.17 |
1170.00, for an amount of 1000 |
REPEAT joins its rules for each record that the query found, as CONCAT does, and joins the results of the records with the Delimiter. For a list of records, query a related object, for example Contact with AccountId Equal the account, and in Case more than one record select a record policy rather than Skip.
CALC results have two decimals. Values with thousands separators, such as 12,123.45, are read as numbers.
To fill a Table field with one row for each record, map the table’s columns and select Select multiple records in Case more than one record. See Table.
Values written to Salesforce
Section titled “Values written to Salesforce”In a Create or Update connector:
- A Date field of the form is converted from its format to the Salesforce format:
yyyy-mm-ddfor a Salesforce date field, or a date and time in UTC for a date/time field. - Other form fields, Label and Fixed value values are sent as text. Salesforce converts them to the type of its field, and refuses a value that doesn’t fit, so the connector fails. See Errors and retries.
To avoid this:
- Send numbers without thousands separators.
- For a picklist, send the API name of the value, which is the value Salesforce stores. When reading, the connector gets the label, which can be different.
- For a checkbox, send
trueorfalse, for example as a Fixed value.
Values in query conditions
Section titled “Values in query conditions”The value of a condition (a form field, a label or a fixed value) is converted to the type of the Salesforce field before the query: numbers without thousands separators, dates, and date/times to UTC. For a checkbox, true, yes and 1 mean true. A picklist is compared by its label.
The operations of a condition depend on the type of the field. ID and lookup fields have Equal, Not equal, Is null and Is not null only. A checkbox can’t be compared with a Fixed value: compare it with a form field or a label, or use Is true or Is false.