Creating an event hook

Learn how to create an event hook and assign it to an application

You can create an event hook by following these simple steps. To put an event hook to use once it's created, you can learn about how to assign them to an application.

  1. You can navigate to Lifecycle Event Hooks in the left-hand menu in the Admin Console.

📘

On the Lifecycle Event Hooks screen, you will see the list of existing event hooks. If this is a new Strivacity instance, then you will not see any listed.

  1. Next, click the '+ Create lifecycle event hook' button.
  2. On the next page, you can select the type of event hook you want to create.

📘

For more information on each of the supported types of event hooks, see Supported Events.

  1. In the popup, you can enter the Name (mandatory) and the Description (optional) of the new event hook.

Event hooks can fall into two categories: they can operate as synchronous or asynchronous events, depending on the hook type selected:

StateOutcome
Await Result is OnControl is transferred to the event hook script for execution. Upon completion, control is returned to Strivacity's normal workflow execution
Await Result is OffThe event hook script is executed but control is not transferred, and Strivacity continues on with its normal workflow execution
  1. You can click 'Create' to continue to the event hook editor.
  2. You can add your custom JS code in Strivacity's integrated IDE to hook into your customer experiences.

📘

You can find more information about Strivacity's IDE at the link.

🚧

If you don't add your changes to the default code of an event hook, it will not be deployed, even if assigned to an application.

  1. You can click 'Save & deploy' once you've completed the necessary development and testing of your event hook code.
  2. Once it's saved, the hook is ready to be assigned to an application.

🚧

Hook status

After adding and saving your code to an event hook, the hook's status will stay non-deployed until you assign it to one of your applications. Afterwards you can check the event hook's deployment status to make sure it's working.