How would you create workflows and triggers from the installer?

We are trying to have our installer be a largely single click experience that will setup sending information to our own servers when a call has started or finished. We have built through the ui triggers and workflows to accomplish this but are unsure of how to incorporate them into the installer. Ideally we'd be able to use the exact export of the workflows we already have. Some solutions we've looked into:

  • Installer provisioning: There doesn't appear to be a provisioning script for triggers or workflows

  • Post install step to hit platform api.

    • POST /api/v2/flows appears to be an endpoint that has reasonable parameters, but that doesn't appear to include adding a version/configuration/actions to it.
    • GET /api/v2/flows/{flowId}/latestconfiguration seems like it would give the latest flow and the version.
    • There is a POST /api/v2/flows/{flowId}/versions to create a version but it doesn't include a shape. When inspecting the post request from the ui that endpoint appears to take a list of numbers. What kind of body are we supposed to send to this?
    • There does not appear to be any apis around triggers
    • It was mentioned to us that "jobs" might be involved in this process so that it could be done asynchronously, but we'd love more information about how that ties in
  • For triggers, it appears we need the process automations api

    • Can we use this in the installer? (I would include links but I'm at the limit)
  • We looked into the Architect scripting SDK

    • It appears to have functionality we would want to create workflows from an export
return scriptingFlowFactory.createFlowWorkflowAsync('flow name', 'Using Architect Scripting', scriptingLanguages.englishUnitedStates, (archWorkflow) => {
                    return archWorkflow.importFromContentAsync(file, () => {
                        return archWorkflow.publishAsync();
                    });
                });
  • However, attempting to incorporate it into the installer feels difficult and our team is questioning if this is meant to be used in the browser, despite only some of the documented methods stating "should not be used when running in a browser". Is it meant to be runnable in a browser? If so, are there any examples of using it with compilation tools such as webpack or vite?
  • If we can incorporate it into the installer, can it use the same credentials provided from installedData?

This functionality is critical to having an install process that doesn't require intervention from our or genesys staff so we would appreciate any guidance y'all can provide. If there are any new apis coming soon we are also eager to be beta testers or at least get an idea of what they look like so we can continue in a deeper and automated integration

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.