Deploying the Schedule order customization
Learn how to deploy the Schedule order customizations to your Order Hub SaaS environments.
To learn more about the deployment process, see Deploying customizations for existing applications.
Procedure
- Log in to Order Hub.
- Switch to the tenant where you want to publish the customization.
- Go to Settings > Configurations > Add ons > Customization configuration.
-
Record the following values.
- Customization folder
- Use this value as the
customizatonContextRoot
that you need to define in the package-customization.json for packaging the customizations. - Customization client ID
- Use this value as the
client-id
when you run the command to deploy customizations. - Customization auth key
- Use this value as the
client-secret
when you run the command to deploy customizations. The auth key is displayed only when you first set up the tenant. If you do not know the auth key, click Regenerate keys.
-
Edit the package-customization.json file that is at the root level of the
module that you customized.
- Since you customized the buc-app-order module, open the devtoolkit_docker/orderhub-code/buc-app-order/package-customization.json file.
- Update the customizationContextRoot with the customization folder value that you retrieved in step 4.
-
In the "routes" section, include the order-search-result route that you
customized.
For example,
{ "repositoryName": "buc-app-order", "customizationContextRoot": "/buc-app-customization/balohTK4anG5GmXsRwOSeSidbQOKEw6N", // replace this with the value you retrieved for customization folder "routes": { "order-search-result": { "type": "code" } } }
- Open the buc-app-order/packages/order-search-result/package.json file.
-
Add the following property to the build-merged script:
--deploy-url=<customizationContextRoot>/buc-app-order/order-search-result.
For example,
"build-merged": "ng build order-search-result --configuration=merged-prod --deploy-url=/buc-app-customization/balohTK4anG5GmXsRwOSeSidbQOKEw6N/buc-app-order/order-search-result/"
Note: You need to update the build-merge script because you customized an existing module. -
Create a features.json file under
devtoolkit_docker/packages/buc-app-order.
Since you didn’t add any new routes (only customized the existing 'order-search-result' route), add an empty array.
[]
- Open a terminal and go to the module's root folder devtoolkit_docker/orderhub-code/buc-app-order.
-
Run the following command to build the package for deployment. This command might take some
time to complete.
yarn package-customization
-
Run the following command to deploy the customizations to the tenant.
yarn orderhub-cli publish-customization --client-id=<clientId> --client-secret=<clientSecret> --package-name=buc-app-order
Note: If the publish-customization command fails (for example, due to a wrong client secret), you can rerun the command with the --publish-only=true --package-name=./dist/buc-app-order.zip parameters.
For more information about using the publish-customization command, see Deploying customizations for existing applications.yarn orderhub-cli publish-customization --client-id=<clientId> --client-secret=<clientSecret> --publish-only=true --package-name=./dist/buc-app-order.zip
-
If you deployed your customizations to the DEV tenant, disconnect the connection to your
developer toolkit by completing the following steps. If you deployed to a different tenant, simply
log in to the tenant to verify that your customizations are available.
- Log in to Order Hub.
- Go to Settings > Customization.
- Click Enable OOB module customization.
- Set the module that you customized to OFF.
-
Save your changes and reload the frame.
The menus revert to the original labels without "(DEV MODE)". You can now verify that your customizations are available and rendering from Order Hub instead of your developer toolkit.