Update BP Record with Attachment
The following applies to the Update BP Record with Attachment (REST API Details in Business Processes) Web Services V2.
PUT /ws/rest/service/v2/bp/record/file
Purpose:
Update a record with attachment in a specific BP in a shell based on "project_number" (provided in input JSON options) or from Company level if the project or shell number is not provided.
The input JSON shall provide various options to be considered for fetching the data.
This V2 service will use the step form to update the BP record. All the required fields and Validation rules will be run against the step form used in the workflow details.
Form in the End step is a View Form and cannot be updated.
Input:
All parameters should be URL encoded.
Both input & output in JSON format in the body.
Update BP Record with Attachment
{
"options":{
"project_number" : "P-0002",
"bpname":"line6",
"LineItemIdentifier":"upwoLISAS",
"workflow_details":{
"WFCurrentStepName":"Step 4",
"WFActionName":"Line 3"
}
},
"data":[
{
"ugenUserIDPK":null,
"_bp_lineitems":[
{
"ugenShellPK":"/AP1",
"uuu_tab_id":"Standard",
"short_desc":"desc3_m11",
"upwoLISAS":"0001",
"uuu_line_item_status":"Active",
"_attachment_from_dm": {
"dm_file_ids": "115"
}
}
],
"record_no":"uxli6-0020",
"title":"new title",
"_attachment":[
{
"file_name":"file_1.txt",
"title":"file_title1",
"issue_date":"05/06/2018",
"revision_no":"300"
},
{
"file_name":"file_2.txt",
"title":"file_title2",
"issue_date":"05/06/2018",
"revision_no":"200"
}
],
"_attachment_from_dm": {
"dm_file_ids": "114"
}
}
],
"_attachment":
{
"zipped_file_name" : "zip_file_name.zip",
"zipped_file_size": "746089",
"zipped_file_content" :"<base64_encoded string of create.zip file>"
}
}
Notes:
- If "adding attachment" is disabled in Upper form or Detail form, and user is trying to attach file to corresponding form. Updating record will fail.
- Only one record update with attachments is supported in this call. If the file exists in a record, then that file will be ignored and will not get revised .
- If step form has "add attachment" disabled, then files will not get attached.
- If the "_attachment" (outside data list) for zip file is not provided, then the record will be updated without attachment.
- Field properties such as Read-only in step form will be retained. The Field mandatory in step form must be present in Integration Form with the direction set as "both" or "input".
- Field direction provided in Integration form will be retained.
- Auto-Creation setting is mandatory in Shell or Company BP Setup in the Admin mode.
- In input JSON options, the "project_number" specifies the shell in which the records exist, if the "project_number" is not provided, then the records are considered to be from Company Level.
- The "record_no" is mandatory and is a part of data.
- The "bpname" is mandatory and is a part of options form parameter.
- If a Workflow BP record is already accepted by an assignee, then Update REST call will fail with error message: "Record has already been accepted by Task Assignee".
- The WFCurrentStepName and WFActionName are part of the "workflow_details" and are for Workflow type BPs. If the values for WFCurrentStepName and WFActionName are provided, then the record will be updated and sent to next step of the workflow. If the values for WFCurrentStepName and WFActionName are not provided, then the record will be updated but it will remain on the same workflow step.
- The LineItemIdentifier is part of options form parameter. The LineItemIdentifier value will be DE name present in the lineItem. That DE should be present in "data" (input record JSON) with its value.
- The "Enable Step for Integration" option in the Workflow BP setup is not available for the REST integration.
Steps to add LineItemIdentifier in the BP design:
- Create a custom DE with DD: Sys Auto Sequence.
- Add this DE to the Detail Form of the BP with the line items that need to be updated.
- Navigate to the Company Workspace > Admin mode > Business Processes and open the BP.
- Click Open drop-down to open and select Data Elements to open the Data Elements Configuration window.
- Click the Auto Sequence tab and click Add.
- Select the data element added in the Detail Form and select the level as: Per Record.
- Provide the start value and click Create.
- Add the parameter "Sys Sequence counter" and click OK.
- Add the DE to Integration > Detail.
- Set the "Direction" to "Both" for that DE.
- Complete and deploy the BP.
- In the body of the request, add the DE name as Lineitem identifier and send the request.
If files from the Document Manager (DM) need to be attached, the field "_attachment_from_dm" must be used. Within that field, a string of comma separated file IDs for the relevant DM files must be provided to the "dm_file_ids" field. Up to 50 files can be attached from the DM at the record and each line item level. Document Type BPs and Text Type BPs are not currently supported. Validations performed for attaching files from the DM using file IDs include:
- If the integration user has DM permissions.
- If the string provided to field "dm_file_ids" is a string of comma separated file IDs.
- If the file IDs provided are valid file IDs.
- Record and line item each have up to 50 files attached from the DM.
- Example input field:
"_attachment_from_dm":{
"dm_file_ids":"123,345"
}
Delete the Line-Item, using Update Request:
To delete the line-Item using update request, the field "_delete_line_item" should be used (value of which will be comma separated values of LineItemIdentifier DE) as shown in the following example:
Sample: Delete line-item input
{
"options":{
"project_number" : "P-0002",
"bpname":"line6",
"LineItemIdentifier":"upwoLISAS"
},
"data":[
{
"ugenUserIDPK":null,
"_delete_bp_lineitems":"0002,0001,0003",
"record_no":"uxli6-0021",
"title":"title_m112244"
}
]
}
Output:
JSON object containing 'status', 'data', 'message'
A message will be present if status is not 200 .
Status codes are:
1>200 OK, if all creation succeeds.
2>3000, if any of records creation fails.
Sample: Update record with attachment response
{
"data":[
],
"message":[
{
"_record_status":"success",
"record":{
"ugenUserIDPK":null,
"record_no":"uxli6-0021",
"title":"title_m112244"
}
}
],
"status":200
}
or if zip_file_size of uploaded zip file is not correct:
{
"data": [],
"message": [
"Uploaded Zip file is invalid"
],
"status": 3003
}
Data Elements in Line Items
If the following Data Elements are present in the Line Items, they will not be updated.
bitemidbudgetidsovitemiduuu_cm0_pickerxidds_codefsm_lineitem_idasm_lineitem_iduuu_latuuu_longuuu_company_account_nameuuu_company_account_codeuuu_company_acc_codepickeruuu_activity_pickeruuu_asset_pickerref_bpo_lineitemref_bporef_rfbrefiduuu_sovlinumotherCompanyIDuuu_costcode_pickerscheduled_valueuuu_asset_cum_depreciationuuu_asset_curr_period_depuuu_asset_net_book_valueuuu_unit_pricecurrencyiddue_dateuuu_asset_calc_as_of_dateuuu_from_dateuuu_issue_dateuuu_last_update_dateuuu_rfb_due_dateuuu_to_dateuuu_week_pickeruuu_datasourceuuu_depreciation_mtduuu_line_item_statusrow_iduuu_bid_countuuu_bidders_countuuu_planning_item_pickeruuu_proj_pickerrecord_nouuu_resc_pickeruuu_role_pickeruuu_commit_short_descend_dateuuu_creation_dateuuu_asset_nameuuu_commit_breakdownuuu_asset_codeuuu_asset_navigation_codeuuu_timescale_unitscreator_idwpiduuu_cost_costattributeuuu_cost_external_refiduuu_cost_statusuuu_cost_cost_typeuuu_cost_descriptionuuu_cost_itemuuu_cost_owneruuu_cost_codeuuu_dm_create_dateuuu_file_create_dateuuu_file_issue_dateuuu_dm_percent_completeuuu_file_sizeuuu_file_versionuuu_dm_descriptionuuu_dm_node_pathuuu_dm_node_nameuuu_file_revision_nouuu_file_titleuuu_dm_create_byuuu_file_create_byuuu_fund_fundcategoryuuu_fund_long_descuuu_fund_descriptionuuu_fund_fundnameuuu_fund_codeuuu_descriptionuuu_resc_nwd_typeuuu_resc_interestuuu_resc_proficiencyuuu_resc_skilluuu_role_statusuuu_role_nameuuu_resc_capacityuuu_user_addressuuu_user_cityuuu_user_countryuuu_user_emailuuu_user_faxuuu_user_firstnameuuu_user_homephoneuuu_user_lastnameuuu_user_mobilephoneuuu_user_pageruuu_user_stateuuu_user_timezoneuuu_user_titleuuu_user_workphoneuuu_user_zipuuu_resc_statusuuu_resc_codeuuu_resc_nameuuu_early_finishuuu_early_start,uuu_finishuuu_late_finishuuu_late_startuuu_startuuu_act_pct_completeuuu_activity_work_hrsuuu_durationuuu_fixed_costuuu_floatuuu_labor_costuuu_non_labor_costuuu_total_costuuu_activity_iduuu_flag_completeuuu_flag_milestoneuuu_activity_resourcesuuu_dependency_typeuuu_activity_nameuuu_outline_codeuuu_cost_li_type
Related Topics
Create BP Record with Attachment
Payment Application with Auto-populate from SOV and Commits
Add Assignees to Workflow BP Records
Last Published Tuesday, July 1, 2025