GithubHelp home page GithubHelp logo

ismailnguyen / fortuneteller Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 21.1 MB

SFCC meta data uploader (vscode extension)

Home Page: https://marketplace.visualstudio.com/items?itemName=ismailnguyen.fortuneteller

License: The Unlicense

JavaScript 100.00%
extension demandware sfcc vscode metadata commercecloud

fortuneteller's Introduction

fortuneteller

Salesforce Commerce Cloud aka SFCC/Demandware meta data uploader VS Code extension

Features

  • Upload and import meta datas with one command

Usage

After installing the extension, open the Command Palette and type Fortuneteller: Upload meta data (Ctrl+Shift+P in Windows, Cmd+Shift+P in Mac OS). You should see toasts appearing and informing you about the status of upload and import of meta datas.

Requirements

  • SFCC developer sandbox with admin rights
  • API user with client id and secret (created from Salesforce's Account Manager)
  • VSCode version > v1.62.2
  • A code workspace with a dw.json file
  • SFCC developer sandbox
  • Internet connection
  • Electricity (otherwise your computer will shut down)

Setup

Sandbox permissions (WebDAV and OCAPI)

In order to allow fortuneteller to upload the metadata into the sandbox (using WebDAV), and import the metadata by executing the out of the box SFCC job sfcc-site-archive-import, you need to give permission to the previously created API user (cf. Requirements).

WebDAV permissions

In your sandbox, under Administration > Organization > WebDAV Client Permissions, use the following snippet by replacing my_client_id with your API user's client ID. Note, if you already have WebDAV Client Permissions configured, e.g. for other API keys, you have to merge this permission set into the existing list of permission sets for the other clients.

{
   "clients":[
      {
         "client_id": "my_client_id",
         "permissions":[
            {
               "operations":[
                  "read_write"
               ],
               "path": "/impex"
            }
         ]
      }
   ]
}

OCAPI settings

In your sandbox, under Administration > Site Development > Open Commerce API Settings, use the following snippet by replacing my_client_id with your API user's client ID. Note, if you already have Open Commerce API Settings configured, e.g. for other API keys, you have to merge this permission set into the existing list of permission sets for the other clients.

{
   "_v": "19.5",
   "clients":[
      {
         "client_id": "my_client_id",
         "resources":[
            {
               "resource_id": "/jobs/*/executions",
               "methods":[
                  "post"
               ],
               "read_attributes": "(**)",
               "write_attributes": "(**)"
            },
            {
               "resource_id": "/jobs/*/executions/*",
               "methods":[
                  "get"
               ],
               "read_attributes": "(**)",
               "write_attributes": "(**)"
            }
         ]
      }
   ]
}

Extension settings

Create (if not already exists) a dw.json inside your code workspace using the following snippet by replacing my_client_id with your API user's client ID and my_client_secret with your API user's client secret. Note, if you already have a dw.json in your workspace, e.g. for cartridges upload with Prophet extension, you have to merge this configuration into the existing dw.json.

{
    "client-id": "my_client_id",
    "client-secret": "my_client_secret",
    "metadata-files": [
        "myFirstProject/site_template/meta/system-objecttype-extensions.xml",
        "myFirstProject/site_template/meta/system-objecttype-extensions.xml",
        "test-repo/data/meta/custom-objecttype-extensions.xml",
        "anotherProject/custom-objecttype-definitions.xml",
        "as many paths to meta data files in this array"
    ]
}

Known Issues

Nothing yet. Please post them into Issues

Release Notes

See Changelog

fortuneteller's People

Contributors

ismailnguyen avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.