Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In order to update a document template in ROFS, a developer can follow these instructions:

  1. Retrieve current letter template to edit

  2. Remove protection on document. In order to edit a document you must click ‘Stop Protection’

  3. Make any necessary edits to the document template

  4. One you are done making edits, add protection back to the document. Leave the password field blank

  5. Convert word file to bytes.

  6. Upload document to DMS.

  7. Update GUID ID in ROFS.

...

...

...

...

...

...

...

...

  1. Retrieve a download link to the current letter template to edit by using accessing the document API swagger page and using the GET /api/v1/document/downloadlink/{id} endpoint. You can get the current template GUID from the Rofs code base in DocumentTemplate.cs.

    Image Added
  2. Remove protection on document. In order to edit a document you must click navigate to Developer > Restrict Editing and then click Stop Protection

    Image Added
  3. Make any necessary edits to the document template.

  4. One you are done making edits, add protection back to the document with the settings in the screenshot. After clicking ‘Yes, Start Enforcing Protection’, leave the password field blank , and click OK

    Image Added
  5. Convert the updated word file to bytes by using one of the following tools:
    https://cloudmersive.com/convert-file-to-json-byte-array-tool
    https://base64.guru/converter/encode/file

...

  1. This will be used to upload the document in JSON format

  2. Upload document to DMS by using the POST /api/v1/documents endpoint with the following request body depending on your language. Replace the parameters in between {} with your request specific values.
    English:

    {
    "userName": "

...

  1. {YourEmail

...

  1. }",
    "fileBytes": "

...

  1. {FileBytesFromStep5}",
    "fileName": "NotificationLetter.docx",
    "fileContentType": "application/msword",
    "submissionMethod": "004",
    "fileLanguage": "english"
    }

    French:

    {
    "userName": "

...

  1. {YourEmail

...

  1. }",
    "fileBytes": "

...

  1. {FileBytesFromStep5}",
    "fileName": "LetterDeNotification.docx",
    "fileContentType": "application/msword",
    "submissionMethod": "004",
    "fileLanguage": "french"
    }

  2. Get the document id from the response generated in step 6 and update the DocID in Rofs DocumentTemplate.cs.

    Image Added

  3. Make sure to upload the updated template to the upper environments as well , by repeating steps 6-7.