Artisan IMG > CrossCap (crosscap) (6b6920e7-c754-4a14-819c-4d7856d72f78)
Artisan IMG > CrossCap (crosscap) (6b6920e7-c754-4a14-819c-4d7856d72f78)

CrossCap
1.0

CrossCap is a central hub for your Martech Stack.

Overview
Copy

CrossCap is marketing calendar and management software that helps you plan, execute, and measure the effectiveness of your marketing campaigns.

Authentication
Copy

When using the CrossCap connector, the first thing you will need to do is go to your Tray.io account page, and select the workflow you wish to work on. Once in the workflow builder itself, search and drag the CrossCap connector from the connectors panel (on the left hand side) onto your workflow.

With the new CrossCap connector step highlighted, in the properties panel on the right, click on the Authenticate tab and 'Add new authentication' (located under the 'Authentication' field).

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

As you can see, the next page asks you for your 'Username', 'Password' and 'BaseURL' CrossCap credentials.

Your 'Username' and 'Password' is your normal CrossCap login and the BaseURL is your normal CrossCap BaseUrl with '/calender-api' appended to it. i.e.https://calendar.demo.crosscap.com/calendar-api.

Once you have added these fields to your Tray.io authentication popup window, click on 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.

Note on connector usage
Copy

Version 0.5 is the beta version of the 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 CrossCap which is not used by any of our operations.

To use this you will first of all need to research the endpoint in the CrossCap API documentation v1.0.0 , to find the exact format that CrossCap 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 CrossCap is your custom BaseURL you entered in the authentication with /api appended to it i.e. https://calendar.demo.crosscap.com/calendar-api/api.

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

More details can be found here.

So if you know what your method and endpoint are, you can get the list of your root folders with the following settings:

Method: GET

Endpoint: /folders

Body Type : none

Final Example outcome should look something like this: https://calendar.demo.crosscap.com/calendar-api/api/folders`

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 crosscap 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 CrossCap connector, to update a list of blocks.

The steps will be as follows:

  1. Setup using a Manual trigger and a CrossCap connector

  2. Add a Loop Collection connector

  3. Add a second CrossCap connector to update each block to auto assign colors.

The final outcome should look like this:

1 - Setup Trigger & CrossCap connector
Copy

Once you have clicked 'Create new workflow' from your main Tray.io dashboard named it, select the Manual trigger from the trigger options available:

After you have been redirected to the Tray.io workflow dashboard, from the connectors panel on the left, add a CrossCap connector to your second step. Set the operation to 'List elements'.

You can update the number of results to return bu changing the page size and index inputs.

Feel free to re-name your steps as you go along to make things clearer for yourself and other users.

2 - Add a Loop Collection connector
Copy

Next, search for the Loop collection 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 CrossCap 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 'crosscap-1' step (with the tail end of the connector-snake), select results 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.io, 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.

3 - Add a second CrossCap connector to update each block to auto assign colors.
Copy

The last step is to drag a CrossCap connector inside of the Loop Collection step itself. Set the operation to 'Update blocks'. As you can see, the 'Block updates' field is required.

Now click Add to block updates and start by using the 'Block identifier' mapping icon to generate the connector-snake.

While hoverinh over 'loop-1' step (with the tail end of the connector-snake), select id 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.

Next select the 'Is color auto assigned' from the list of parameter paths.

The final piece of setup is the value. Change the data type to Boolean and then select the check box.

The step is now setup and this will now auto-assign colors for elements returned in the 'crosscap-1' step by setting the 'Is color auto assigned' parameter to true.

By running the workflow and going to the 'Debug' panel, you will be able to see the result. The 'Loop Collection' will result in running the last step for all of the number of elements you have and the 'Update blocks' step will run on each element.

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