{"id":18777564,"url":"https://github.com/onify/blueprint-cloudblue-commerce-change-subscription","last_synced_at":"2025-12-16T23:30:16.019Z","repository":{"id":113735656,"uuid":"604593859","full_name":"onify/blueprint-cloudblue-commerce-change-subscription","owner":"onify","description":"Onify Blueprint: Change subscription in CloudBlue Commerce","archived":false,"fork":false,"pushed_at":"2023-02-22T08:27:08.000Z","size":812,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T17:57:03.935Z","etag":null,"topics":["bpmn","cloudblue","flow","integration","onify","onify-blueprint","onify-blueprints","rest-api"],"latest_commit_sha":null,"homepage":"https://onify.co","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-21T11:46:44.000Z","updated_at":"2023-02-22T08:29:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"142f3bae-e992-4b0d-8dd3-84dc7ab144de","html_url":"https://github.com/onify/blueprint-cloudblue-commerce-change-subscription","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onify%2Fblueprint-cloudblue-commerce-change-subscription","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onify%2Fblueprint-cloudblue-commerce-change-subscription/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onify%2Fblueprint-cloudblue-commerce-change-subscription/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onify%2Fblueprint-cloudblue-commerce-change-subscription/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onify","download_url":"https://codeload.github.com/onify/blueprint-cloudblue-commerce-change-subscription/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239687683,"owners_count":19680773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bpmn","cloudblue","flow","integration","onify","onify-blueprint","onify-blueprints","rest-api"],"created_at":"2024-11-07T20:11:50.425Z","updated_at":"2025-12-16T23:30:15.960Z","avatar_url":"https://github.com/onify.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Onify Blueprints](https://files.readme.io/8ba3f14-onify-blueprints-logo.png)\n\n[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)\n![Test suite](https://github.com/onify/blueprint-cloudblue-commerce-change-subscription/workflows/Test%20suite/badge.svg)\n\n# Onify Blueprint: Change subscription in CloudBlue Commerce\n\n## About \n\n### About CloudBlue\n\n[CloudBlue](https://www.cloudblue.com) is a SaaS company that is helping businesses transform themselves, whatever their position in the supply chain. They provide a managed marketplace platform that takes the complexity out of distributing subscription- based solutions in the everything-as-a-service world.\n[CloudBlue Commerce](https://www.cloudblue.com/commerce/) is multi-tier commerce platform that allows companies to build marketplaces.\n\n\u003e Also checkout https://github.com/cloudblue.\n\n### About this Blueprint\n\nThis Blueprint increases or decreases product quantity for a specific subscription via CloudBlue REST-API. I only works if you have one product per subscription! If you have multiple products in the same subscription, only the first will be updated.\n\n\u003e Note: The provisioning of licenses is async and you are not allowed to update a subscription that is currently in provisioning mode.\n\n![Onify Blueprint: Change subscription in CloudBlue Commerce](blueprint.jpg \"Blueprint\")\n\n## Requirements\n\n* [Onify Hub](https://github.com/onify/install)\n* [Camunda Modeler](https://camunda.com/download/modeler/)\n* [CloudBlue Commerce](https://www.cloudblue.com/commerce/)\n\n## Included\n\n* 1 x Flow (BPMN)\n\n## Setup\n\n### CloudBlue Commerce\n\n[Follow these instructions to get a API Subscription Key](https://kb.cloud.im/support/solutions/articles/66000489946-how-to-get-cloud-marketplace-api-subscription-key).\n\n\u003e For more information about the CloudBlue Commerce API, please see https://apidocs.cloud.im/1.8/howto/ready.\n\n### Onify\n\nAdd the following settings in Onify.\n\n|Key|Name|Value|Type|Tag|Role|Description|\n|---|----|-----|----|---|----|-----------|\n|cloudblue_baseurl|CloudBlue Base URL|`\u003cBASEURL\u003e`|string|cloudblue, frontend|admin|The Base URL for the API, eg. `https://api.cloud.im/marketplace/eu`|\n|cloudblue_marketplace|CloudBlue Marketplace|`\u003cMARKETPLACE\u003e`|string|cloudblue, frontend|admin|The short name for the commercial marketplace, eg. `se`|\n|cloudblue_subscriptionkey|CloudBlue Subscription Key|`\u003cKEY\u003e`|password|cloudblue, frontend|admin|Subscription to API services that contains certain limits on the API usage, for example, it defines the upper limit on the number of requests your system can send per a period of time. |\n|cloudblue_username|CloudBlue Username|`\u003cUSERNAME\u003e`|string|cloudblue, frontend|admin|Username is the login name to authenticate your system.|\n|cloudblue_password|CloudBlue Password|`\u003cPASSWORD\u003e`|password|cloudblue, frontend|admin|Password for the user|\n\n\u003e Note: Creating settings via admin interface add a trailing `_` in key. This is required for flow to work.\n\n## Deploy\n\n1. Open the BPMN diagram in Camunda Modeler.\n2. Deploy the BPMN diagram (click `Deploy current diagram` and follow the steps).\n\n## Run\n\nThis workflow should be run as a _adhoc workflow_ and can be part of another process.\nHere is an example how to get a secret using a simple `curl` command.\n\n### Variables\n\n* `subscriptionId` - The id for the subscription\n* `poNumber` - Purchase order number (optional)\n* `changeType` - `increase` or `decrease` the quantity \n* `units` - Units to either increase or decrease product quantity\n\n### Example request \n\n```bash\ncurl -X 'POST' \\\n  '{url}/api/v2/my/workflows/run/cloudblue-commerce-change-subscription?timeout=180' \\\n  -H 'accept: application/json' \\\n  -H 'authorization: {auth-token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n \"subscriptionId\": 123456,\n \"poNumber\": \"9999\",\n \"changeType\": \"increase\",\n \"units\" : 1\n}'\n```\n\n\u003e Note: It can take more than 60 seconds for the order request, so make sure you increase default timeout.\n\n### Error responses\n\n#### Timeout for CloudBlue\n\nIt seems that sometime CloudBlue times out...\n\n```json\n{\n  \"output\": \"\u003chtml\u003e\\r\\n\u003chead\u003e\u003ctitle\u003e504 Gateway Time-out\u003c/title\u003e\u003c/head\u003e\\r\\n\u003cbody\u003e\\r\\n\u003ccenter\u003e\u003ch1\u003e504 Gateway Time-out\u003c/h1\u003e\u003c/center\u003e\\r\\n\u003chr\u003e\u003ccenter\u003enginx\u003c/center\u003e\\r\\n\u003c/body\u003e\\r\\n\u003c/html\u003e\\r\\n\",\n  \"status\": {\n    \"statuskey\": \"complete\"\n  }\n}\n```\n\n#### changeType incorrect\n\n```json\n{\n  \"statusCode\": 502,\n  \"message\": \"\u003cchangeType\u003e no conditional flow taken\",\n  \"error\": {\n    \"message\": \"\u003cchangeType\u003e no conditional flow taken\"\n  }\n}\n```\n\n#### Subscription not found\n\n```json\n{\n  \"statusCode\": 404,\n  \"message\": \"Response code 404 (Not Found)\",\n  \"error\": {\n    \"message\": \"Response code 404 (Not Found)\"\n  }\n}\n```\n\n#### If provisioning already in progress\n\n```json\n{\n  \"output\": {\n    \"correlationId\": \"a8n-54bc6dc3-f496-84c7-dfe9-f459db8564b3\",\n    \"status\": 500,\n    \"message\": \"Cannot Upgrade/Downgrade Resources for Subscription #123456: there is already an Upgrade/Downgrade Order #CH009999 in status Provisioning is in progress(LO). This order prohibits placing an order of the same order type (per subscription). Please either cancel conflicting order or wait until it is processed by the system.\",\n    \"path\": \"/orders\",\n    \"timeStamp\": \"2023-02-22T07:45:08.223+00:00\"\n  },\n  \"status\": {\n    \"statuskey\": \"complete\"\n  }\n}\n```\n\n## Support\n\n* Community/forum: https://support.onify.co/discuss\n* Documentation: https://support.onify.co/docs\n* Support and SLA: https://support.onify.co/docs/get-support\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonify%2Fblueprint-cloudblue-commerce-change-subscription","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonify%2Fblueprint-cloudblue-commerce-change-subscription","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonify%2Fblueprint-cloudblue-commerce-change-subscription/lists"}