This package contains adapters for several WordPress plugins.
Easy Appointments Context
This component provides appointment management functionality using the Easy Appointments WordPress booking plugin.
When to Use
This context can be used when you need to manage appointments for a user identified by their email address.
How to Use
This context can currently be used for the following functionalities:
- Loading a single appointment for a user identified by email address
- Loading multiple appointments for a user identified by email address
- Checking the availability of an appointment
- Suggesting available slots for an appointment type
- Creating a new appointment for a user identified by email address
- Updating an existing appointment for a user identified by email address
- Canceling an existing appointment for a user identified by email address
Parameters
- Context ID – can be an expression like
${APPOINTMENT_TYPE}
from the VARIABLES section or just a textual value - Connection ID – can be a numeric value which represents the ID of a Connection
Formidable Forms Context
The Formidable Forms Context implements Convoworms Forms functionality for the Formidable Form Builder plugin.
You can use this context to create, update, delete, and load form entries.
Parameters
- Context ID – A unique ID for referencing this context.
- Form ID – The form ID of the form this context will handle. Can accept ID or form key.
- User ID – The WordPress user ID operating with the form.
Note on Searching Entries
When using this context with the Search Forms Element, the parameter search expects a string. It is passed to the \FrmEntry::getAll( $where, $order_by, $limit, $meta, $inc_form)
function as the $where argument.
Available Functions
formidable_get_form_id( formKey)
– Returns the form ID (numeric) for the given unique form key.formidable_get_field_id( fieldKey)
– Returns the field ID (numeric) for the given field key.formidable_get_field_key( fieldId)
– Returns the field key (string) for the given field ID (numeric).
Custom Queries and Getting Entries
If you are performing custom queries with the WP DB Element to fetch entries, you can access this context through expression language to get fully loaded entries with the following code: ${contexts['my_context_id'].getEntry( entryId)}
QSM Trivia Adapter Element
Converts a QSM quiz into a format more suited for Convoworks Trivia elements, e.g., trivia round block.
When to Use?
Use the QSM Trivia Adapter Element when you want to adapt a QSM quiz for use with Convoworks elements.
How to Use?
- Before you start:
- Make sure you have a QSM quiz with only horizontal/vertical multiple choice questions.
- For older versions of the QSM plugin where you are able to mark an answer as correct,
only mark a single answer as the correct one
. - For newer versions of the QSM plugin, if you can only enter points per answer, make sure
only the correct answer is worth points
. It can be worth 1 or more points, but all other answers must be worth 0 points. - A maximum of 28 answers is allowed per question, one for each letter of the English alphabet.
- Once you have a quiz ready, note its ID. You can find the ID by checking the shortcode for the quiz.
- Set
QSM Quiz ID
to this ID. As a side note, this property is evaluated, so you can write an expression here. - Pick a
Storage Type
andName
under which the quiz will be stored. -
The result is an array of questions, where each question looks like this:
text
— The actual text of the question.answers
— An array of answer objects, which look like this:
text
— The text of the answerletter
— The letter associated with the answeris_correct
— Boolean; whether the answer is correct or not.
- As a quality-of-life feature, each question has a
correct_answer
object that is set to the correct answer. Refer to the layout of answer objects above.
SSA Appointments Context
This component provides appointment management functionality for the Simply Schedule Appointments WordPress Booking Plugin.
When to Use
Use this component when you need to manage appointments in your conversational service, and you are using Simply Schedule Appointments WordPress Booking Plugin. Currently, this context can be used for the following functionalities:
- Loading a single appointment for a user identified by their email address
- Loading multiple appointments for a user identified by their email address
- Checking the availability of an appointment
- Suggesting available slots for an appointment type
- Creating a new appointment for a user identified by their email address
- Updating an existing appointment for a user identified by their email address
- Canceling an existing appointment for a user identified by their email address
How to Use
To use this component, you need to provide the following parameters:
- Context ID – This can be an expression like
${APPOINTMENT_TYPE}
from the VARIABLES section, or just a textual value. - Appointment Type – This can be a numeric value that represents the ID of an Appointment Type, or a case-insensitive title of the Appointment Type.
Five Star Restaurant Reservations Booking Free Context
This component provides functionalities for managing restaurant bookings using the Five Star Restaurant Reservations – WordPress Booking Plugin.
When to use:
- This version of the context covers only the functionalities available in the free version of the plugin.
- If the “Allow Cancellations” option is disabled, the Booking Cancellation will not work.
- If the “Require Phone” option is set to “Yes”, you will have to include the phone field in the payload for the Create Appointment Element and Update Appointment Element.
How to use:
- Load a single booking for a user identified by email address.
- Load multiple bookings for a user identified by email address.
- Check availability for a booking.
- Suggest available slots for an appointment type.
- Create a new appointment for a user identified by email address.
- Update an existing appointment for a user identified by email address.
- Cancel an existing appointment for a user identified by email address.
Examples of supported payload keys and values set for Create Appointment Element and Update Appointment Element:
message
– Additional message for the staff.name
– Customer’s full name under which the reservation will be recognized by the staff.party
– Number of people.phone
– Customer’s phone number on which the staff can contact the customer about the reservation.
Parameters:
Context ID
– Can be an expression like${APPOINTMENT_TYPE}
from the VARIABLES section or a textual value.
WP Album Media Context
This component defines WP_Query which will return audio files from custom posts types of a playlist to be streamed via audio player components.
Arguments
All arguments are passed to the real WP_Query class except offset
, which is set to 0, and paged
, which is always set to true.
This means that there is no pagination. Setting the posts_per_page
will set the maximum results in a playlist (20 by default).
You can use expressions when defining arguments. For more information on how to use expressions, refer to the
Convoworks documentation.
The expressions are evaluated in the service scope, so you cannot use internal variables that are available inside container elements (e.g. Loop element).
Other Parameters
All other parameters are optional and allowed to be empty by the platforms (e.g. artwork) or provided required values by Convoworks.
All parameters accept expressions that will be evaluated in the service context.
Most of them are also in the post context, meaning that the “post” variable is available in the context (the real \Wp_Post object from the loop).
Album Song Parameters
With these two parameters, you can access songs that are stored in the post meta of an album post.
The first parameter has to be a resolved array that represents the album songs and contains song-related data.
The second parameter is just the name of a single song which will be used in song-related parameters.
- Songs of Album – can be an expression like
${get_post_meta(post.ID,"album",true)}
- Song of Album – just a name for the single song of Songs of Album
Default Settings Parameters
Default loop status
and Default shuffle status
define initial values that will be used when your user starts the player for the first time.
Media Info
WP Media Context provides media info data that you can use through connected components (e.g. Media info element, Media block).
In these components, you will provide a name under which this data (associative array) will be available, and here are the fields it consists of.
current
– IAudioFile, current songnext
– IAudioFile, next song if existscount
– integer, playlist songs countlast
– boolean, is the current song the lastfirst
– boolean, is the current song the firstsong_no
– integer, current song, starting from 1loop_status
– boolean, is the loop mode enabledshuffle_status
– boolean, is the shuffle enabledplaying
– boolean, is the player currently playing