Skip to main content

Sitecore Commerce – XC9 Tips – Configuring Postman

In this post, I am going to show how to setup postman and run the scripts.

When you download Sitecore Commerce, it includes ready to use postman sample requests (inside Sitecore.Commerce.Engine.SDK.x.x.x folder).



You need to import that postman folder to postman app. The steps are written in official documentation, just click import and choose postman folder.

You will see some parameters in sample requests such as {{SitecoreIdServerHost}}, {{OpsApiHost}}, {{OpsApi}}

Those are environment based variables that you can change according to your environment details.



When you click "setting" icon, you will see predefined environments: AdventureWorks and Habitat.

For example, click "Habitat Environment" to edit its variables.


You see that AuthoingHost is using port 5000, it is the default port if the that port is available. You can check which port is using your Authoring role from IIS.


If your Authoring port is different than 5000, you need to update your postman environment variables.

An important request is Bootstrap. It provides to move configurations from files to database.

To run it, first you need to get authentication token. Run {{SitecoreIdServerHost}}/connect/token request under Authentication > Sitecore > GetToken path.

If it doesn't work, check SitecoreIdServerHost parameter. It must match with your Id Server (see IIS).

After you get token, run Bootstrap request:



Again you can check OpsApiHost and OpsApi variables from environment configuration window, in case you get an error.

Hope, it helps!



Comments

  1. You can consult an Astrologer online from the comfort of their home and enjoy best astrology predictions using Astrogurutips Astrology, Hindu Astrology, Indian Astrology, Nadi Astrology, Tarot Card, KP Astrology, Prashna Chart and Lal Kitab Astrology
    Astro guru online

    ReplyDelete

Post a Comment

Popular posts from this blog

Sitecore 9 - Custom Page Events & Filtering with XConnect

This is the first article of a series. I am going to start with creating a custom page event and will show how we can fetch event data using xconnect api. Let's start with reminding demo scenario: Imagine that you have a website displaying movies. Visitors are able to see movie details and take some actions like save movie or share it.  You want to follow the visitors' activities and you want to take some marketing actions based on those activities. For example, if a contact visits a movie more than X time or she/he saves a movie, you want to send those movies to an external system. In addition, there is going to be a limit to send same movie. Such as, it will not be possible to send same movie more than 2 times.  You want to configure this as a marketing automation plan to give flexibility to your marketing managers. They should be able to add configurable rules and activities.  My first focus is movie detail page. I want to track visitors when they visit the

A React Example in Sitecore

That's true, Sitecore components are useful and provide lots of facilities. They allow to build fully flexible website. And there is not much problem using post-backs to display your contents. However, if your website has user interactions, then it could be a headache. Too many post-backs would occur a poor user experience. That's why client-side technologies are really powerful and popular for a long time. There are plenty of javascript libraries and frameworks which all try to provide better user experience in different ways. It is not a topic of this article why I chose React. There are some good articles about it (e.g. Jonne Kats' great article ). However, one of the reasons is React only focus on view part. It is not a fully framework like Angular, it is rich featured library instead. And that's what I was looking for! The idea was to benefit Sitecore server-side and React client-side power. It seems they are very good match! Let's dive into code... I&#

Sitecore 9 - Creating Custom Segmentation Rule

Predicates are important to create rules for marketing automation and segmented lists. Before going through the details, I am going to remind what I am implementing again. Imagine that you have a website displaying movies. Visitors are able to see movie details and take some actions like save movie or share it.  You want to follow the visitors' activities and you want to take some marketing actions based on those activities. For example, if a contact visits a movie more than X time or she/he saves a movie, you want to send those movies to an external system. In addition, there is going to be a limit to send same movie. Such as, it will not be possible to send same movie more than 2 times.  According to my scenario, I need a rule to filter contacts who visits a movie more than X time. Maybe, we can add one more condition there like in Y days. To creating rule will give flexibility to marketing managers that then they can easily add or remove multiple rules and proceed the