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

  1. Add the Create Records Node

    1. Click the + icon within your workflow and select Create Record.

  2. Select the Entity

    1. Choose the entity you want to create, either a Profile or a Transaction.

  3. Map the Data

    1. On the left, you can view available workflow variables or manually enter values.

    2. 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

  1. Click the plus (+) icon to add a Create Record node.

  2. Select Profile as the entity type.

  3. Assign a variable name for this profile instance (e.g. newProfile)

  4. 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.

  5. 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.

  6. Map other fields like First Name, Last Name, Full Name, and any custom profile fields as needed.

  7. To add additional fields, click the plus (+) button and map the variables accordingly.

    1. On the left side, Click the dollar icon (variable selector) to open the variable menu.

    2. Find the relevant entity bucket either Salesforce Variables or your profile variable bucket (e.g.newProfile)

    3. Use Groovy scripts for any custom data transformations as needed. To add Groovy code, click on Custom Code within the variable selector.

      1. Inside your Groovy script, use the variable selector again to reference any workflow variables directly within the script.

  8. 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

  1. Add a new Create Record node and select Transaction as the entity type.

  2. Mandatory Fields

    1. User ID: Map the transaction’s User ID field to the profile’s Social Network User ID (e.g.newProfile.SNID)

      1. This links the transaction to the correct profile and allows multiple transactions per profile.

    2. Distribution Channel: Add 'Distribution Channel” as “EMAIL”, “SMS” or “WHATSAPP_BUSINESS” as relevant.

  3. Custom Fields

    1. Map any other required transaction fields by selecting workflow variables on the left and the corresponding transaction fields on the right.

      1. On the left side, Click the dollar icon (variable selector) to open the variable menu.

      2. Find the relevant entity bucket either Salesforce Variables or your profile variable bucket (e.g.newProfile.SNID ).

      3. Use Groovy scripts for any custom data transformations as needed. To add Groovy code, click on Custom Code within the variable selector.

        1. Inside your Groovy script, use the variable selector again to reference any workflow variables directly within the script.

  4. 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?

  1. Add the Create Record node at the desired step in your workflow.

  2. Select the entity type you want to create: Profile or Transaction.

  3. Map the required fields by selecting workflow variables or entering static values.

  4. 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.

  5. Save your workflow.

  6. 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:

  1. Configure Your Workflow

    1. 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.

    2. Ensure that profile and/or transaction creation steps are configured correctly.

  2. Execute the Workflow Using Test Data

    1. Run the workflow with sample test data to verify that all nodes trigger and execute as expected.

  3. Validate Profile Creation

    1. Navigate to Audience Profile and go to Record Manager.

    2. Use the search bar and enter the profile name in double quotes to get an exact match.

    3. Apply relevant filters (e.g., channel) to narrow down results

    4. Check that:

      1. The profile was created successfully.

      2. The channel (e.g., Email, SMS, WhatsApp Business) is setup correctly.

      3. All mapped fields (e.g., First Name, Last Name, Custom Fields) appear under the “Properties” section of the profile.

  4. Validate Transaction Creation

    1. Navigate to the CFM Persona App and go to Audience Manager then go to Transactions Record Manager.

    2. A new Transaction Group is automatically created using the workflow name. Its type will be ‘Workflow’.

    3. To validate:

      1. Click the Vertical Ellipsis next to the Transaction Group name.

      2. Select View Transactions to see all transactions created by that workflow.

      3. Verify that:

        1. The correct profile name is associated.

        2. All transaction fields have been populated as per workflow mapping.

  5. Test Survey Distribution

    1. Ensure the Create Record step comes before the Trigger Survey Distribution Node.

    2. 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.

  6. Validate Response Behavior

    1. After survey is received, fill a response and go to the Responses tab, and verify:

    2. Any transaction fields passed in the workflow are visible here. You can add them by clicking on ‘Add Column Right/Left'.

    3. The same values shall work in:

      1. Analytics filters.

      2. Custom reporting.

Key points to note

  1. 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.

  2. 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.

  3. 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.

  4. 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.


FAQs

Yes. First, create a profile record, then create a transaction using that profile’s assetId. Use a variable reference like newProfile.assetId to connect them.

You must include:

  • Social Network: One of EMAIL, SMS, or WHATSAPP_BUSINESS

  • Social Network User ID: The actual email address or phone number

  • Highly Recommended, but not mandatory. First Name, Last Name, and optionally FullName (can be created using Groovy)

Yes. Groovy scripts are supported in the variable selector. They can be used to:

  • Concatenate fields (e.g., full name)

  • Convert date formats (e.g., ISO to Epoch)

  • Add dynamic values like current timestamp

If a value doesn’t match the expected format or dropdown options (for single/multi-select), the field will be skipped or the workflow may fail depending on the configuration.

  • For profiles, go to Audience > Profile Record Manager, search using the exact name (within quotes), and verify field values.

  • For transactions, go to Audience > Transactions, open the relevant Transaction Group named after the workflow, and view all transactions created.

Yes. After creating records, you can trigger a Survey Distribution in later nodes and use the mapped profile or transaction fields for placeholders, logic, or segmentation.