Precisely Enterworks

 View Only
  • 1.  Loading Images & Linking Through APIs

    Posted 01-25-2021 10:38

    I have a need to load images & link those images to SKUs using APIs.  Here's the scenario:  Stocking Unit records are created via API.  On those records are URLs pointing to images I need loaded into DAMMaster (S3).  Once those images are loaded, they need to be linked to the Stocking Unit record just created.   I would prefer this all be done through some automated approach.  

    I am looking for best practice solutions and how others have solved for this.  



    ------------------------------
    Jeff Wiedemann | Engineer, Apps
    Steelcase, Inc | 616-460-0597
    ------------------------------


  • 2.  RE: Loading Images & Linking Through APIs

    Employee
    Posted 01-31-2021 19:28
    Jeff,

    The latest versions of the Services Framework include an HTML page for a custom action to upload and link a digital asset to a record being edited.  This includes the API calls necessary to perform both actions.  A digital asset can be linked before it is actually processed by the DAM so there's no need to wait until the asset has been moved to the DAMRoot S3 bucket.  The worse-case scenario would be that the asset fails to be processed and the link points to a non-existent asset, which will appear in the UI as image not found.  You can find the file in the Services Framework deployment folder under the Enable2020\custom folder and the file name is UploadLinkedAssetes.html.  There is also a brown bag session covering setting up a custom action using this file (session #31).

    If the name of the asset can be used to identify what record (and in what repository) it should be linked to, another option is to set up a combination of Scheduled Export that feeds a Scheduled Import.  The Scheduled export would generate an import file to create the missing records in the DAMLink repository and then the Scheduled Import would import the resulting file.  This only works if the file names follow a consistent naming convention and in cases where assets can be linked to more than one repository, the naming convention is thorough enough to be able to identify which repository along with which specific record. 

    -Brian





    ------------------------------
    Brian Zupke | Senior Technical Support Engineer
    Winshuttle North America | 9099009179
    ------------------------------