Configuring FSM Program Field Mappings
Use projectMap for project inputs and caseMap for case inputs. projectData and caseData provide related records under their named template context, such as asset, customer, and project. A case rule can use linked project data through the inherited caseData.project definition without first copying every value onto the case.
This topic includes the following sections:
The projectMap and caseMap properties extend the effective input maps, including applicable record-model mappings. These effective maps also include Program's identity, type, status, time zone, and date mappings. Program uses the effective case map to write generated cases. Generated tasks use the Program task map. Keep source aliases distinct from destination fields. A named input or related-data value doesn't automatically become a writable case or task property. For reusable model mappings and default definitions, see FSM Record Model Configuration.
Case destination aliases include type, details, assigned, startdate, starttime, enddate, endtime, and timezone. Task destination aliases include type, assigned, startdate, starttime, enddate, endtime, and timezone. The details property is not a supplied task alias. Use compatible writable native field IDs for additional outputs. The projectMap property supplies input data for project rules. This property is not the destination map for generated cases.
Program can automatically add a missing direct-field mapping referenced by a tag such as ${project.comments}. An explicit alias, formula, join, or formatted value still needs the appropriate mapping. This automatic mapping doesn't make an arbitrary field or join valid. A field with an account-specific nxc ID is not a standard NetSuite field merely because it can be referenced by its native ID. Keep useful aliases and formatting. Removing mappings is not a general prerequisite for Program.
Use the mapped name in a template tag. In the following example, projectassets supplies ${project.projectassets}. Date, time, and multiselect inputs need compatible formats such as [date], [time], and [array]. These formats describe the value. The formats don't create fields or change the NetSuite field type. For formula, join, and format syntax, see FSM Field Mapping Reference. For template tag syntax, see FSM Template Tags.
Project Values on Generated Cases
This illustrative annual rule carries the project's asset, a custom multiselect asset list, and project comments onto generated cases. The custom project and case fields must exist and accept the same asset selections. The explicit case mapping preserves multiselect formatting when that destination is written.
{
"program": {
"projectMap": {
"projectassets": "custentity_nxc_project_assets[array]"
},
"caseMap": {
"custevent_nxc_case_assets": "custevent_nxc_case_assets[array]"
},
"projectRules": [
{
"project": [3],
"case": {
"type": 3,
"custevent_nx_case_asset": "${project.custentity_nx_asset}",
"custevent_nxc_case_assets": "${project.projectassets}",
"details": "${project.comments}"
},
"interval": 12,
"unit": "month",
"create": true
}
]
}
}
The details alias is the Program case mapping for custevent_nx_case_details. Use this alias when replacing the generated series description. A literal "comments" writes that word. The template tag "${project.comments}" copies the project's comments. Other supported destination aliases include type and assigned. Use valid native field IDs for additional destination fields without an alias. Don't assume every output property is a valid writable field.
To carry project comments separately, create a case text field. Set that field in case and leave details unset to preserve the default series description. The same pattern can carry a project PO Number to an appropriate case field. Add the output to every intended project rule. The output supplies values at creation and doesn't continuously synchronize existing cases. For information about the sourcing scenario, refer to Field Source from Project to Case (PM program).
Linked Project Times and Assignee on Generated Tasks
Create Time-of-Day fields on the project for task start and end time, and a compatible Employee selection for task assignee. This fragment extends the inherited linked project lookup with formatted time mappings. Its custom fields and type IDs are examples. Retain every case rule needed by the account when replacing caseRules.
{
"program": {
"caseData": {
"project": {
"map": {
"starttime": "custentity_nxc_task_starttime[time]",
"endtime": "custentity_nxc_task_endtime[time]"
}
}
},
"caseRules": [
{
"project": [3,4,5,6,7],
"case": [3],
"offset": 0,
"unit": "day",
"total": 1,
"task": {
"type": 1,
"starttime": "${project.starttime}",
"endtime": "${project.endtime}",
"assigned": "${project.custentity_nxc_task_assignee}"
}
}
]
}
}
The related lookup's record, filters, and Project Type mapping remain inherited. The time values populate the task's Field Service start and end times in its service time zone. Choose values that satisfy normal task date and time requirements. Program initially uses the case's time zone for the task. That value can differ from an asset's time zone, and a selected assignee doesn't establish availability or resolve scheduling conflicts. Use starttime and endtime for these time outputs, rather than introducing start and end as task fields. For information about the source scenario, refer to Field Source from Project to Task (PM program).
Examples of Program Input Mappings
The following table shows account-specific mappings for the indicated Program maps.
|
Location and Mapped Name |
Example Mapping |
Use |
|---|---|---|
|
|
|
Supplies a fallback Case Type value as |
|
|
|
Reads the primary contact's email without making it a project write destination. |
|
|
|
Reads a linked Company's technician ID for task |
|
|
|
Supplies a compatible case multiselect skill list for the task skill field. |
The case skill field must contain IDs from the same Skill list as the task's multiselect field. A typed native output such as "custevent_nx_task_skill[array]": "${supportcase.case_skill}" preserves array serialization. Joined inputs must be valid search columns for the source record. A trailing | makes a mapping read-only. It doesn't add permission to write to the joined record. Preserve distinct mapped names when adding values so that a custom join doesn't unintentionally replace the case's normal start and end mappings.
Task Field Values from Cases and Projects
This example creates one task with the case's start date, start time, and assignee. It uses an account-specific source for task priority and copies two work order values from the linked project. The custom fields must exist with compatible source and destination types. The priority source must supply a valid task priority value. Don't assume case priority IDs are interchangeable with task priority values.
{
"program": {
"caseMap": {
"taskPriority": "custevent_nxc_task_priority",
"fsointernalid": "company.custentity_nxc_fso_id|",
"fsojobtype": "company.custentity_nxc_fso_job_type|"
},
"caseRules": [
{
"project": [103],
"case": [102],
"unit": "day",
"offset": 0,
"total": 1,
"task": {
"type": 111,
"startdate": "${supportcase.startdate}",
"enddate": "${supportcase.startdate}",
"starttime": "${supportcase.starttime}",
"assigned": "${supportcase.assigned}",
"priority": "${supportcase.taskPriority}",
"custevent_nxc_fso_link": "${supportcase.fsointernalid}",
"custevent_nxc_fso_job_type": "${supportcase.fsojobtype}"
}
}
]
}
}
The source case start time must be populated for this explicit copy. Omitted task time outputs use the configured task defaults. An explicit output replaces that value rather than automatically falling back when its source is blank. The same approach can carry a project's task priority through caseData.project instead of using a case field. The work-order fields are examples of account-specific references, rather than shipped Program defaults. Copying scheduling values supplies record values. It doesn't select an available resource, update matched tasks, or continuously synchronize changed source values.