Create Records
Updated
The Create Records action node enables workflows to dynamically create entities such as Profiles and Transactions as part of an automated journey. This is particularly important for Salesforce Outbound Message events, where a profile and or transaction must be created before triggering surveys or other downstream actions.
You can refer to the Survey Workflow Overview report to get further details.
Prerequisites
This feature is generally available as part of CFM. No specific permissions are required to access this node.
How does it work?
Availability
This capability is available across all CFM workflows, except for the Survey Response event.
When to Use
The Create Records node should be added at the beginning of the journey, based on your use case.
For Salesforce Outbound Message events, creating a Profile is mandatory before triggering survey distribution.
Steps to Configure
Add the Create Records Node
Click the + icon within your workflow and select Create Record.
Select the Entity
Choose the entity you want to create, either a Profile or a Transaction.
Map the Data
On the left, you can view available workflow variables or manually enter values.
On the right, select the corresponding Profile or Transaction fields to map the data accordingly.
This setup enables seamless creation of required records, ensuring downstream actions like survey distribution function correctly.
Creating a Profile
Mandatory Fields:
Social Network: You must select one of the distribution types EMAIL, SMS, or WHATSAPP_BUSINESS.
Social Network User ID: You must select the email address or phone number, depending on the channel.
Steps to Create a Profile
Click the plus (+) icon to add a Create Record node.
Select Profile as the entity type.
Assign a variable name for this profile instance (e.g. newProfile)
Map the Social Network field:
On the left side, select or enter the workflow variable or static value (e.g., EMAIL)
On the right side, select the Social Network profile field.
Map the Social Network User ID field similarly:
Use the appropriate workflow variable containing the email or phone number on the left.
Select the corresponding profile field on the right.
Map other fields like First Name, Last Name, Full Name, and any custom profile fields as needed.
To add additional fields, click the plus (+) button and map the variables accordingly.
On the left side, Click the dollar icon (variable selector) to open the variable menu.
Find the relevant entity bucket either Salesforce Variables or your profile variable bucket (e.g.newProfile)
Use Groovy scripts for any custom data transformations as needed. To add Groovy code, click on Custom Code within the variable selector.
Inside your Groovy script, use the variable selector again to reference any workflow variables directly within the script.
Assign a Variable Name (e.g. newProfile) - This is not the actual name of the profile but the variable name assigned to the profile within the context of the current workflow instance. This name allows you to reference the created profile later in the same workflow, for example, to update a custom field, trigger a survey distribution, or create a transaction linked to this profile. Anytime you want to refer to this profile in subsequent steps, use this variable name.

Creating a Transaction
Add a new Create Record node and select Transaction as the entity type.
Mandatory Fields
User ID: Map the transaction’s User ID field to the profile’s Social Network User ID (e.g.newProfile.SNID)
This links the transaction to the correct profile and allows multiple transactions per profile.
Distribution Channel: Add 'Distribution Channel” as “EMAIL”, “SMS” or “WHATSAPP_BUSINESS” as relevant.
Custom Fields
Map any other required transaction fields by selecting workflow variables on the left and the corresponding transaction fields on the right.
On the left side, Click the dollar icon (variable selector) to open the variable menu.
Find the relevant entity bucket either Salesforce Variables or your profile variable bucket (e.g.newProfile.SNID ).
Use Groovy scripts for any custom data transformations as needed. To add Groovy code, click on Custom Code within the variable selector.
Inside your Groovy script, use the variable selector again to reference any workflow variables directly within the script.
Assign a Variable Name (e.g.newTransaction): This is the variable name assigned to the transaction within the context of the current workflow instance. This name allows you to reference the created transaction later in the same workflow, for example, to update a field, trigger a survey distribution.


Data Governance Tips
When creating or updating records, it’s important to maintain clean and valid data. Here are some key tips:
Single-Select & Multi-Select Fields: Ensure values exactly match the predefined options configured in the platform. Invalid entries will be rejected.
Date Fields: All date fields must be passed in Epoch time format (milliseconds since Jan 1, 1970). This is mandatory for consistent time-related data handling.
Using Groovy in Create Record Nodes
Workflow’s Create Record node allows users to create custom entities like profiles and transactions during workflow execution. To make these records dynamic and precise, you can apply Groovy scripting for value transformation and follow data governance best practices to ensure reliable execution.
Groovy scripting is supported within the mapping interface of Create Record nodes and can be used for:
Data formatting
Real-time value transformations
Date conversions
Field concatenation
Some Sample Groovy script for common use cases are listed below.
Convert ISO Date String to Epoch

To return a formatted Date object instead of Epoch

Note
Adjust the format string ("dd-MM-yyyy HH:mm:ss")
Always handle null or empty date values in your Groovy script to prevent workflow failures. Ensure your workflow logic accounts for missing or invalid dates before reaching the Create Record node.
Make sure the source, whether API or Salesforce does not send date fields with null values in the required variable, or add appropriate handling within the workflow. If you implement conditional handling and one branch allows the date field to be empty, avoid applying Groovy transformations on that empty field to prevent errors.
If any unsupported format is passed without proper Groovy transformation, the entire “Create Record” node will fail - preventing the profile or transaction from being created & by extension causing the workflow to not procced.
Even if only one date field fails, it breaks the node execution.
Combine First Name and Last Name into Full Name

Get Current Epoch Timestamp
![]()
Get Current Date as Object
![]()
How to use it?
Add the Create Record node at the desired step in your workflow.
Select the entity type you want to create: Profile or Transaction.
Map the required fields by selecting workflow variables or entering static values.
For Salesforce Outbound Message events, make sure to select the profile or transaction variable you created in the Create Record node. This ensures the survey is properly associated with the correct profile or transaction record.
Save your workflow.
Test the workflow using relevant test data to verify the records are created as expected and the survey distribution triggers correctly.
Note: For detailed steps on validating record creation and survey triggering, please refer to the How to Test section below.
Validating Create Record
Follow these steps to validate the Create Record functionality within a workflow:
Configure Your Workflow
Add Actions and Conditions: Set up all required actions (e.g., Create Record, Trigger Survey Distribution etc ) and decision conditions as per your use case.
Ensure that profile and/or transaction creation steps are configured correctly.
Execute the Workflow Using Test Data
Run the workflow with sample test data to verify that all nodes trigger and execute as expected.
Validate Profile Creation
Navigate to Audience Profile and go to Record Manager.
Use the search bar and enter the profile name in double quotes to get an exact match.
Apply relevant filters (e.g., channel) to narrow down results
Check that:
The profile was created successfully.
The channel (e.g., Email, SMS, WhatsApp Business) is setup correctly.
All mapped fields (e.g., First Name, Last Name, Custom Fields) appear under the “Properties” section of the profile.
Validate Transaction Creation
Navigate to the CFM Persona App and go to Audience Manager then go to Transactions Record Manager.
A new Transaction Group is automatically created using the workflow name. Its type will be ‘Workflow’.
To validate:
Click the Vertical Ellipsis next to the Transaction Group name.
Select View Transactions to see all transactions created by that workflow.
Verify that:
The correct profile name is associated.
All transaction fields have been populated as per workflow mapping.
Test Survey Distribution
Ensure the Create Record step comes before the Trigger Survey Distribution Node.
Confirm that data such as First Name, Last Name, and any mapped custom fields are correctly passed to the following:
Survey Message Placeholders (Email/SMS): Ensure that placeholders in the message resolve accurately using the data mapped in the Create Record node.
Survey Translations Based on Profile Fields: If you’ve configured distribution translation rules within your distribution:
Make sure the language field(e.g. preferred_language) is correctly passed through the workflow.
Verify that the received Survey Message appears in the appropriate language based on the profile custom field’s value.
Survey Builder Placeholders and Logics (e.g., Display/Skip Logic):
Confirm that any survey logic conditions relying on a transaction field values function as expected. These may include:
Showing or skipping questions based on user attributes.
Customizing survey flow based on mapped transaction data.
Confirmed that any placeholder is added in the survey builder a result as expected based on the value of the said field.

Validate Response Behavior
After survey is received, fill a response and go to the Responses tab, and verify:
Any transaction fields passed in the workflow are visible here. You can add them by clicking on ‘Add Column Right/Left'.
The same values shall work in:
Analytics filters.
Custom reporting.
Key points to note
Profile Name Field Cannot Be Updated through Workflow
There is an ongoing issue with updating the ‘Profile Name’ field. CFM uses the First Name, Last Name, and Full Name fields internally for placeholders and references.
Using the Profile Name field may causes errors, especially if the workflow runs again for the same profile — leading to failures.
Single-Select and Multi-Select Field Restrictions
The values passed must match the allowed options exactly. Invalid values will cause the workflow to error or skip field mapping.
Transaction Requires Profile Mapping
When creating a transaction, you must first create a profile and then map profile.assetId to the transaction’s userId to associate them correctly. Skipping this step will break the transaction mapping.
All date fields must be passed in Epoch time format
If any unsupported format is passed without proper Groovy transformation, the entire “Create Record” node will fail - preventing the profile or transaction from being created & by extension causing the workflow to not procced.
Even if only one date field fails, it breaks the node execution.
Note:
If you're using Groovy to transform the date, make sure the input variable contains a valid date string. Invalid or empty strings (like "null" or "") will cause Groovy errors and break the node.
Always add fail-safes:
Use a Decision Box node before the Create Record step to check if a valid date exists.
Or, add null/error handling inside your Groovy script.