Every Journey App has an Actor. The Actor represents an individual customer going through an Airkit App. Airkit uses this actor to help route incoming chat and voice interactions to the correct customer. The actor model allows the Airkit platform to co-exist on multiple different channels of communication. This enables the platform to seamlessly transition between different channels.
A key piece of the actor is a users phone number. Chat and voice operations rely on the actor being correctly configured. Typically, this process occurs during the Journey Start event.
Setting a Customer Mobile Number
Actor initialization requires two steps to be performed. First, the actor variable must be initialized. This can be done using a set-variable action.
actor.phone should be the phone number associated with the customer. The phone variable on the actor must be initialized for chat and voice communication. The phone number must also be formatted into the E164 format.
The second step is to invoke the initialize actor action. This action performs the final registration of the actor. There is a possibility that an actor already exists. An actor might already exist if this customer has gone through the journey before, or they might have started a journey via a different channel. Regardless, the set actor action allows for this conflict to be resolved. The two options are:
- Replace: If a matching actor exists, replace the actor. This associates the actor with the current journey.
- Fail: If a matching actor exists, cancel the set actor action. Chat and Voice channels will not be enabled for this journey
Starting from voice and chat
If a journey is started from an SMS message being sent to a phone number or a voice call to that phone number, Airkit captures the incoming phone number in the session.start. With the phone number surfaced in session.start, the actor variable can be set and initialized on Journey Started, to set the actor to the incoming phone number.
Updating Actor Mid Journey
Most actor initialization occurs at the beginning of an app. However, some journeys may not capture the customers phone number up front. The actor initialization can still occur.
The two steps to initialize an actor can be performed in any event. For example, after capturing a user phone number in a string input, a button click event could trigger the two needed actions. This enables configuring the actor mid journey. After configuration, chat and voice bots will be enabled.
The actor is an crucial piece when creating customer journeys that leverage chat bots or voice bots, because it allows a user to seamlessly transition across different channels of communication. For more information on the actor and working with SMS or voice, read: