Sreeram_Marella | 2019-06-06 21:32:54 UTC | #1
Hi,
I have two questions.
- What is the best way to handle code migrations (Dev -> QA-> Prod) for Architect applications?
- Is it possible to use any configuration files/variables to change url, key_api, input and out data contracts without creating a new Data Action?
Thanks, Sreeram
anon28066628 | 2019-06-06 22:26:18 UTC | #2
Hi Sreeram,
(1) It's possible to create a migration flow from one PureCloud org to another using the Architect scripting SDK (https://www.npmjs.com/package/purecloud-flow-scripting-api-sdk-javascript). The level of effort is significant, since object references to Queues, Skills, Users, Data Actions, and so on are different in the target org and must be updated. The SDK is a flow generator, which can upload and publish flows, including updating object ids.
It's usually simpler to develop the flow in the org in which it will be used, test it there using a non-production DID number, and change the DID routing to point to the new flow when it's ready to go live.
Or you can import the flow from the Dev and Test orgs (assuming you're working in different orgs), understanding that the object references will need updated manually to use the equivalent assets in the Prod org.
(2) Data actions can be updated via the public platform API. You could create a script that reads or monitors a config file to update an existing action. The configuration of a published action can be changed (request template, req type, translationMap, successTemplate, and so on). The input and output contracts are locked on publish and can't be changed - in this case a copy must be made.
You can also generate and update a flow to use the new Action with the Architect SDK, btw. It supports importing flows and iterating through their hierarchy - you could look for nodes of specific types (Call Data Action, Transfer to ACD) and update them accordingly.
Sreeram_Marella | 2019-06-07 10:38:28 UTC | #3
Hi Smith,
Thank you so much for quick response. My issue here is we have different urls for Dev, QA and prod web services. We did a create flow in the org where it is going to be used and also using test DID. We need to keep changing urls for unit, QA and UAT for any changes. Are you saying we can export call flow, make changes for urls and import it back to same org? If yes, what tool can be used to update .i3InboundFlow files?
Regards, Sreeram
anon28066628 | 2019-06-07 14:40:22 UTC | #4
Hi Sreeram,
If you're speaking of migrating the web services from Dev through QA to Prod, then yes you may only have to change the URL.
The Architect flows should not need updated (as long as the input and output contracts of the Data Actions do not change). The Data Actions themselves can have their configuration changed, but not the contracts.
A side note, i3Inbound files cannot be updated directly. The Architect scripting SDK I mentioned earlier can import them and then programmatically manipulate and re-export them, and/or upload and publish them from the SDK.
Sreeram_Marella | 2019-06-12 10:12:16 UTC | #5
Smith,
Thank you for your help. Appreciate your quick response, We got it working partially and still need to implement reading from a configuration file.
Regards, Sreeram
anon28066628 | 2019-06-14 17:56:38 UTC | #6
Hi Sreeram,
That's great to hear, and a good use-case for updating data actions via the platform API. If you're updating the actions using a script from a configuration file, I'd suggest also adding automated tests of the draft action before publishing the changes.
system | 2019-07-15 17:56:42 UTC | #7
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 5305