Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Create a custom action to generate an object from a record

Generate an object from a User record. Learn how to use an Action output to create an object from record values.

Before you begin

Role required: admin

About this task

Use this example to see demonstrations of these operations and steps.

  • Create action inputs for the User record fields First name, Last name, and Email.
  • Lookup a User record matching the action input values.
  • Create an action output for a contact object.
  • Save the contact object as a template.
  • Map contact object values to User record field values.
  • Test the action with a sample user.

Procedure

  1. Create an application to store your work.

    Use the Guided Application Creator.

    For example, create My Application.

  2. Navigate to Process Automation > Flow Designer.

    The system displays the Workflow Studio landing page.

  3. Select New > Action

    The system displays the Action Properties dialog.

  4. Enter these sample values.

    FieldValue
    NameCreate Contact Object From User
    ApplicationMy Application
    Accessible FromAll application scopes
  5. Select Submit.

    The system displays the Workflow Studio interface.

  6. From the Action Outline, select Inputs > Create Input

    The system displays a new action input.

  7. Configure the action input with these values.

    FieldValue
    LabelFirst name
    TypeString
    MandatoryTrue
  8. From the Action Outline, select Inputs > Create Input

    The system displays a new action input.

  9. Configure the action input with these values.

    FieldValue
    LabelLast name
    TypeString
    MandatoryTrue
  10. From the Action Outline, select Inputs > Create Input

    The system displays a new action input.

  11. Configure the action input with these values.

    FieldValue
    LabelEmail address
    TypeString
    MandatoryFalse
  12. From Action Outline, select Outputs > Create Output.

    The system displays a new action ouput.

  13. Configure the output variable with these values.

    LabelNameTypeMandatory
    contactcontactObjectFalse
  14. From the row for the contact Object, select Add Child Item.

  15. Configure the child item with these values.

    LabelNameTypeMandatory
    First namefirst_nameStringTrue
  16. From the row for the contact Object, select Add Child Item.

  17. Configure the child item with these values.

    LabelNameTypeMandatory
    Last namelast_nameStringTrue
  18. From the row for the contact Object, select Add Child Item.

  19. Configure the child item with these values.

    LabelNameTypeMandatory
    Email addressemail_addressStringFalse
  20. From the row for the contact Object, select Toggle Advanced Inputs.

  21. From the Advanced Options, select Save As Template.

    The system displays the Save As Template dialog.

  22. For Enter a Name, enter contact.

  23. Click Save.

  24. Select Exit Edit Mode.

    The System displays the output fields you created.

  25. Configure the outputs with these values.

    LabelValue
    First name[step->Look Up Record step->Record->First name]
    Last name[step->Look Up Record step->Record->Last name]
    Email Address[step->Look Up Record step->Record->Email]

    Note: You can select data pills from the data panel or from the Data Pill Picker button.

  26. Select Save.

  27. Select Test.

    The system displays the Test Action dialog.

  28. Enter these test values.

    InputValue
    First nameAbel
    Last nameTuter
  29. Select Run Test.

    The system runs the action with the test values provided.

  30. Select Action has executed. To view the action, click here.

    The system displays the action execution details.

  31. Review the runtime value for the action Output data.

    The system displays output data in JSON format.

    For example, sample contact object JSON for the user Abel Tuter.

    {
        "contact": {
            "email_address": "abel.tuter@example.com",
            "last_name": "Tuter",
            "first_name": "Abel"
        }
    }
    

Result

You have a custom action that looks up a User record and converts it into a contact object.

What to do next

Customize the action to use your own logic.

Parent Topic:Complex data