Artisan IMG > Wicket (wicket) (33bf44d1-c8dd-4acd-bdd8-4723569bc9d2)

Wicket
1.3

Wicket provides a single source of truth for all of your member data.

Overview
Copy

Wicket is a member data platform. It integrates with all the tools your team uses and feeds data back into a centralized database, where you can keep track of the experience your members have across all channels.

API INFO: The Base URL used for the wicket connector is https://<tenant_id>-api.wicketcloud.com. More information can be found on their main API documentation (v1.0) site.

Authentication
Copy

Within the workflow builder, highlight the Wicket connector.

In the Wicket connector properties panel to the right of the builder, click on the Authenticate tab and the 'Add new authentication' button.

This will result in a Tray.io authentication pop-up modal. The first page will ask you to name your authentication and select the type of authentication you wish to create ('Personal' or 'Organisational').

The next page asks you for your 'Base URL', 'Admin UUID', and 'Secret Key' credentials.

In order to get these fields, contact Wicket support.

Your base URL will take the format https://<tenant_id>-api.wicketcloud.com. Contact support to retrieve your tenant ID.

Once you have added these fields to your Tray.io authentication pop-up window, click the 'Create authentication' button.

Go back to your settings authentication field (within the workflow builder properties panel), and select the recently added authentication from the dropdown options now available.

Your connector authentication setup should now be complete.

Available Operations
Copy

The examples below show one or two of the available connector operations in use.

Please see the Full Operations Reference at the end of this page for details on all available operations for this connector.

Using the Raw HTTP Request ('Universal Operation')
Copy

As of version 1.0, you can effectively create your own operations.

This is a very powerful feature which you can put to use when there is an endpoint in Wicket which is not used by any of our operations.

To use this you will first of all need to research the endpoint in the Wicket API documentation v, to find the exact format that Wicket will be expecting the endpoint to be passed in.

Note that you will only need to add the suffix to the endpoint, as the base URL will be automatically set (the base URL is picked up from the value you entered when you created your authentication).

The base URL for Wicket is: https://<tenant_id>-api.wicketcloud.com

For example, say that the 'List people' operation did not exist in our Wicket connector, and you wanted to use this endpoint. You would use the Wicket API docs to find the relevant endpoint - which in this case is a GET request called: /people.json.

More details about this endpoint can be found here.

As you can see, there is also the option to include a query parameter, should you wish to do so. So if you know what your method, endpoint, and details of your query parameters are, you can get the .................. information with the following settings:

Method: GET

Endpoint: people.json

Query Parameter: Key: page[number] Value: 1

Final outcome being: /people.json?page[number]=1

Example Usage
Copy

TRAY POTENTIAL: Tray.io is extremely flexible. By design there is no fixed way of working with it - you can pull whatever data you need from other services and work with it using our core and helper connectors. This demo which follows shows only one possible way of working with Tray.io and the wicket connector. Once you've finished working through this example please see our Introduction to working with data and jsonpaths page and Data Guide for more details.

Below is an example of a way in which you could potentially use the Wicket connector to iterate over a list of people and add them to a CSV file, ready to be exported.

The steps will be as follows:

  1. Setup using a manual trigger and retrieve a list of people using the Wicket connector.

  2. Create a new CSV file with the required fields.

  3. Loop through the list of people fetched in the List people step and add it to the newly created CSV file.

  4. Export the CSV as an XLSX file.

Your completed workflow should look similar to this:

1 - Setup Trigger & retrieve a list of people
Copy

Select the manual trigger from the trigger options available.

From the connectors panel on the left, add a Wicket connector to your workflow. Set the operation to 'List people'.

As you can see, the 'Page number' and 'Page size' fields are mandatory. The value for the Page size field specifies the number of records to be returned and and the Page number field's value specifies the beginning of the fetched results.

Provide suitable values as per your requirements in these fields.

Feel free to re-name your steps as you go along to make things clearer for yourself and other users. The operation names themselves often suffice.

When this workflow is run, it will return a list of the first 100 people in your Wicket account.

2 - Create a CSV and add records
Copy

Next, add a CSV connector as the next step in your workflow and set the operation to 'Create CSV'.

Set the value for the 'Number Of Columns' field as per your requirement. In this example, we have set it to 3 as we need to add values for the three columns specified below, all with a data type as 'Text':

  • id

  • given_name

  • family_name

Next, search for the Loop connector within your connector panel, and drag it into your workflow as your next step. Set your operations to 'Loop list'.

The Loop Collection connector allows you to iterate through a list of results. In this example, we will use it to iterate through the data found within the previous Wicket connector step.

In order to specify the list you want to loop through, start by using the list mapping icon (found next to the list input field, within the properties panel) to generate the connector-snake.

While hovering over the 'List people' step (with the tail end of the connector-snake), select data from the list of output properties displayed. This will auto-populate a jsonpath within your list input field, and update the type selector to jsonpath.

For more clarification on the pathways you have available, open the Debug panel to view your step's Input and Output.

JSONPATHS: For more information on what jsonpaths are and how to use jsonpaths with Tray, please see our pages on Basic data concepts and Mapping data between steps

CONNECTOR-SNAKE: The simplest and easiest way to generate your jsonpaths is to use our feature called the Connector-snake. Please see the main page for more details.

When this workflow is run, it will iterate each record in the list fetched from the List people step.

Add another CSV Editor connector inside the Loop step itself, this time with the operation set to 'Add Row'.

Use a connector-snake to find the value for the CSV ID field from the 'Create CSV' step. It should appear similar to this: $.steps.csv-1.id.

Then, for all the Cell Values, use the connector-snake again to retrieve the values from the Loop step. They all should appear as follows:

  • id: $.steps.loop-1.value.id

  • given_name: $.steps.loop-1.value.attributes.given_name

  • family_name: $.steps.loop-1.value.attributes.family_name

Now when run, the workflow will add each person's ID, given name, and family name to the CSV file.

3 - Export the CSV file
Copy

The last step is to drag another CSV Editor step onto the end of the workflow. Set the operation to 'Export CSV'.

Once again, using connector-snake, provide the jsonpath for the CSV ID field as we did in the previous step.

Give your CSV file a suitable name in the Filename field. Make sure to add a .csv extension to the filename.

We have now completed this workflow. When run, it will return a list of people from your Wicket account and export their IDs and names as a CSV file.

You can use the Debug tab to [inspect your logs] (/platform/troubleshooting/logs-and-debugging/) for each step to verify if your workflow is running as expected.

BEST PRACTICES: Whenever you do decide to create your own workflow, be sure to check out some of our key articles such as: