1.0.5 • Published 2 years ago

@netchainmedia/vcaid v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Veeva Creators Aid (vcaid)

Creators aid tool for creating veeva content

Installation

VCaid is a command line tool for veeva content creators and has been build on Node.js v14.17.5, and has not been tested on older versions yet. You can install it globally as below

npm i -g @netchainmedia/vcaid

Features

  • (In-progress) Generate boilerplate template of approved emails and clm presentations from yaml configuration files.
  • (Not complete) Prepares deployment ready content for veeva platform
  • (Not complete) FTP uploads veeva content to the vault.

Configuration

Instead of manually creating configuration files, step 1 to 5 in the email section below can be automated by issuing comand as follow. It will create default configuration from the master configuration in to your current working directory.

vcaid config

Emails

This tool generates boilerplate code from configuration and templates, if provided the user's configurations will be effective otherwise the code is generated from master configuration and template. 1. To generate email boilerplate code, add default.yml file under /config directory.

mkdir test && cd test && mkdir config && touch config/default.yml
  1. Populate the default.yml file with below code as a starter and can be modified as suited.
fragment:
  output_dir: fragment
  images_dir: images
  default_font: Arial
  fallback_font: sans-serif
  content:
    fragments:
      - fragment:
          image:
            alt: Packshot
            file_path: packshot.png
          title: Fragment Title
          description:
            - paragraph: This is the fragment default description.
            - paragraph: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
          button:
            text: Click here
            href: https://example.com
email:
  output_dir: email
  images_dir: images
  default_font: Arial
  fallback_font: sans-serif
  content:
    preheader_text: The default preheader text
    header:
      title: Email Title
      belowtitle_text: addition text below title
      background:
        file_path: header.png
    prescribing_information:
      text: Click here for prescribing information
      href: "{{PILink}}"
    salutation: Dear {{accTitle}} {{accLname}}
    prefragment_text: This is the default text that appears before fragments. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labo re et dolore magna aliqua.
    fragments:
      - fragment:
          image:
            alt: Packshot
            file_path: packshot.png
          title: Fragment Title
          description:
            - paragraph: This is the fragment default description.
            - paragraph: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
          button:
            text: Click here
            href: https://example.com
    body:
      - paragraph: This is the email body text that appears after the fragments. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labo re et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
      - paragraph:
          - item: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
          - item: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
          - item: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
      - paragraph: This is the email body text that appears after the fragments. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labo re et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
    preclosure_text:
      - paragraph: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labo re et dolore magna aliqua
    closure_text: Yours sincerely,
    user_name: "{{username}}"
    user_email: "{{userEmailAddress}}"
    user_phone: "{{User.Phone}}"
    disclaimer:
      - paragraph: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt
    logo:
      alt: Logo
      file_path: logo.png
      width: 135
    footer:
      company_name: Lorem Ipsum Ltd
      address:
        - line: Lorem Ipsum
        - line: Lorem, Ipsum Consectetur, AB00 0XY
      phone: 00000 00100
      copyright_text: Copyright <sup>©</sup> 2021 Lorem Ipsum Ltd. Company number 000000. All rights reserved.
      unsub_text: <a style="color:#373737!important;Margin:0;font-family:Arial,sans-serif;font-size:12px;line-height:14.06px;text-decoration:underline" href="{{unsubscribe_product_link}}"><font color="373737">Click here</font></a> to manage your email settings or unsubscribe, and to view <a style="color:#373737!important;Margin:0;font-family:Arial,sans-serif;font-size:12px;line-height:14.06px;text-decoration:underline" href="https://example.com/privacy-statement"><font color="373737">privacy statement</font></a>
    job_code: XY-AB-000000 V1 | April 2022
presentation:
  output_dir: presentation
  slides:
    - slide:
        name: home
        title: Home
        menu: main
        index: 1
        content:
          - paragraph: This is the default paragraph for the slide. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labo re et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
    - slide:
        name: sitemap
        title: Sitemap
        menu: main
        index: 2
        content: This is the default paragraph for the slide. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labo re et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
  shared_resource:
    name: shared
    title: Shared
    css:
      - file:
          file_path:
    scss:
      - file:
        file_path:
    js:
      - file:
          file_path:
    images:
      - file:
          file_path:
  1. Create directory for images as per the yml configuration above to match with images_dir key, in this case images
mkdir images
  1. Copy files for header, fragment, logo as per the yml configuration above to match with email.content.header.background.file_path, content.fragments.fragment.image.file_path & content.logo.file_path respectively to the images directory
  2. Run generate command to generate the approved email
vcaid gen -t email