Agnostic Guides
...
Developers Guide
SCRUD API’s

CMS_API_CREATE

4min

Functionality 

Description

FileNet Notes 

Documentum Notes 

Box Notes 

M365/SharePoint Notes 

IV_CMSPROFILE 

Required: Determines which configured CMS Profile in Link Enterprise SAP to utilize. Combination of CMS Profile and CMS Tag determine the API destination and thus load across an RFC destination. 









IV_CMSTAG 

Required: Determine which configured CMS Profile in Enterprise SAP to utilize. Combination of CMS Profile and CMS Tag determine the API destination and thus load across an RFC destination. 









IV_REPOSITORY 

Required: Determines which configured repository in Link Enterprise SAP to utilize 

Object Store 

Docbase 

Default is the only Store/Repository supported since Box currently doesn’t support the notion of different repositories. 

Site, site collection 

IV_TYPE 

Optional: what CMS type to create. 



DOCUMENT CLASS 



Defaults to the “Document” document class if unspecified. 

OBJECT TYPE 



Defaults to the “dm_document” class if unspecified. 



METADATA TEMPLATE 



Defaults to creating a document with no metadata template if not specified.

CONTENT TYPE 



Defaults to creating a document of content type Document if not specified. 

IV_USE_MAPPING 

Optional: use mapping of IV_TYPE to CMS type in Enterprise Connector if CMS. Used if ArchiveLink doctype name to CMS type mapping is required. 









IV_ID 

Optional: id to use for versioning a document. When specified a new version of the existing id is created with the given content. 

GUID 

r_object_id 

id 

Versioning not supported 

IV_FILENAME 

Optional: the filename of the content being added to the CMS. If omitted some systems allow for a contentless document to be added. 

Used for the “content element” as well as the “DocumentTitle” unless “DocumentTitle” is set in the metadata which will override this. 



May be empty for a contentless document. 

Used as the “object name “as well as the “title” metadata property unless title is set in the metadata which will override this. If the filename is empty then the “title” is set to the “object id.” 



May be empty for a contentless document. 

Used as the “name” metadata property unless “name” is set in the metadata which will override this. 



Box requires that a filename and subsequent content be passed in since currently there is no support for a contentless document. 

Used as the “LinkFilename” metadata property 

IV_CHECKIN_AS_MIN 

Optional: performs the check-in as a minor version.





Not supported 



Not supported 



IV_CHECKOUT 

Optional: allows you to checkout a document prior to creating a new version of the document. 

Only available with new versions. 

Only available with new versions. 

Checks out the document prior to creation and cancels the checkout after the creation has occurred to help guarantee no other person or process modifies the document while the creation call is happening. 

Not supported 

IV_FIND_CURFROM_ID 

Optional: allows you to find the latest version from the given id (since the id might not be the latest version of the document). 





Not supported since currently Box ids are the same for every version. 

Not supported since currently SharePoint ids are the same for every version.

IV_LOCATION 

Optional: (Mandatory for M365/SharePoint) allows you to specify where to add the document in the content management system.

If unspecified documents are left unfiled. 

If unspecified documents are stored in root of the users cabinet. 

A number for the exact folder location can be specified. 



If unspecified documents are stored in the configured root. 



Relative folder names can be used with a / being the root. If a root folder is configured for the Box CMS in the Enterprise connector all relative folder locations will be relative to the root folder configured. 



Relative folder names are not recommended for performance reasons. 

This is required and is the Document Library 

IT_FOLDER_METADATA

Optional: metadata will be applied at the folder level instead of the file level.

Not supported

Not supported

Applies metadata at the top level folder only

Applies metadata at the top level folder only

IV_FOLDER_NESTED

Optional: set to X if the use of CT_CUSTOM you choose to use nested folders.

Not supported

Not supported

X = nested folders

Not supported

IT_METADATA 

Optional: metadata to set during creation. 



Some metadata cannot be set during creation and is only read only (some system properties). 



Updating some system properties in certain repositories may lead to unknown results. 



The Link Enterprise username and timestamp properties are automatically set as metadata during creation if they are configured on the particular CMS tab in the Link Enterprise Connector. 



When the same keys are used multi valued properties are set with all of the specified values. The ZMULTI flag is ignored during a create since the same key signifies a multi valued property by default. 

To assist with the date format for FileNet, you may choose to utilize the Link Enterprise helper method ‘/dflow/cl_utilities_helper=>format_date’ to format a system date field to the format desired 

To assist with the date format for Documentum, you may choose to utilize the Link Enterprise helper method ‘/dflow/cl_utilities_helper=>format_date’ to format a system date field to the format desired 

Currently doesn’t support multi valued metadata. 



Where a date field is part of the metadata being sent, the format must be MM/dd/yyyy hh:mm:ss a z, where a z = the AM/PM and TIMEZONE 



example: 12/31/9999 12:00:00 PM MST T o assist with the date format for Box, you may choose to utilize the Link Enterprise helper method ‘/dflow/cl_utilities_helper=> format_date_plus_sys_timezone’ to format a system date field to the format desired and also appending the system timezone 

Currently doesn’t support multi valued metadata. 

IT_CONTENT

Optional if CMS supports folder creation and 1 or more folder are specified









EV_RETURNID 



The id of the document added to the CMS. 









ET_RETURN 

Table that indicates a success of an error. The TYPE field will contain an ‘S’ or ‘E’ respectively and the MESSAGE field will contain information in the case of an error. When you use the IT_CUSTOM folder to create folders, the return table will also pass back the folder ID's created. The parent folder is indicated by a ! exclamation point, all sub-folders are indicated by a ~ tild. Example of return table when folders are created:

!SAP_4500017723,147811962292

~SAP_SubFolder1,938382828

~SAP_SubFolder2,938382829

~SAP_SubFolder3,938382830 Refer to the below examples for more return table samples.









CT_CUSTOM 

Optional: If supported by your CMS repository, the list of folder(s) to create.



This requires the BADI /DFLOW/DOCMANGER_STOREANDLINK to be implemented.



You have two choices:

1. Flat Folder Structure

2. Nested Folder Structure



For nested, you must set the flag IV_FOLDER_NESTED



The first line is the parent folder, lines 2 and above are subfolders (optional).



By default, Link Enterprise places the content (when applicable) in the first folder/first line (when flat) or top level folder (when nested).



You can override this by placing a ~ tild preceding the folder name.



Example 1:

SAP_PO_HEADER_4500012349 SAP_PO_LINE_00010 SAP_PO_LINE_00020 (content will be placed in first/top folder by default)

Example 2:

SAP_PO_HEADER_4500012349 SAP_PO_LINE_00010 ~SAP_PO_LINE_00020 (content will be placed in last/lowest sub-folder)



*note: the flag CS_ZDMC01-ZOWNFOLDER must be set for fodlers to be created.



This can be et either in the docManager rule or directly via the BADI.







Not supported 

General Box comments: 

  • It is recommended to configure the “error on duplicate” in the Link Enterprise Connector since automatically versioning of documents with the same name can produce unpredictable results.
  • Locations can be specified either using the exact folder number or via a relative path with / being the root. If the location is specified via a relative path the folder names can take upwards of 1-2 minutes before a create using a relative path in the location field will find it.
  • General cleanup utilities are present in Box so that if an error happens when creating a document the document is attempted to be permanently deleted if permissions allow it. Otherwise subsequent cleanup may be required for failed documents. For instance if setting the metadata fails but creation of the document succeeds. They are handled via separate calls to Box so grouping them into a single transaction that can be rolled back is not possible.
  • By default (for performance reasons), Link comes with the updating of Box system properties (referred to as Basic Metadata) turned OFF. This affects both the CREATE and UPDATE API's. If you want to update Basic Metadata (note the any metadata templates and properties you create on your own are considered Custom Metadata, of which is always enabled), you will need to change the config.properties property box.basicMetadataUpdate=YES. Refer to the section "Adjusting Box Rate Limit and Basic Metadata" in the Base Installation and Configuration guide for more detail.

Example

Below is an example call from storing a document via Services for Object. Place a breakpoint at

Document image


Metadata passed

Document image


Custom table passed

In this example, we instructed Link Enterprise to create a 1 level subfolder. This is done by filling the CUSTOM table with the folder name:



Document image


Return table received

note: in this return table, we see that we also have Link Enterprise configured to create a folder. When this occurs, the '!' indicates the folder name and the second value is the folder ID.