Creating integrations to localized or smaller systems will often require a lot of development time. However, with the help of Zapier, you can create custom integrations, with limited development knowledge, to basically any platform (that has a Rest API. In this article, we're going to show you how to create an order in Fortnox when a document is signed in GetAccept, but this example can be used as a template to basically any platform that has a Rest API.

In order to be able to use any platforms API you need to get access to it. Please talk to your customer representative to get this access. In this example we're using the Fortnox API, which you can find the documentation to here. When you've gotten access you can follow the steps that follows.

First, we need to create a new Zap that is triggered by the action Document is signed in GetAccept:

Connect your GetAccept account and test the trigger. Next up is to list all the customers you have in the platform you want to connect. The reason why we're doing this step is because we do not want to create any duplicates of already existing customers (and we want to use the existing customer if name matches company name in GetAccept).

Click the plus sign and search for webhooks:

Select custom request. The reason why select custom is because we've noticed that some APIs do not like the automatic formatting that the Post and Get requests from Zapier does.

Add information as you see below. For the GET-request you do not need to add any data, but you need to add the authentication headers:

Next step is to filter out any customers that already exist in Fortnox. Click the plus sign and select filter:

You could of course match any other relevant variable to your liking, but in this example we're going to use Company name on recipient in GetAccept and Customer name in Fortnox as you see below:

Now that we've added that filter, we're going to go ahead and add the customer to Fortnox, which is now only done if the customer doesn't exist already. In the same way as you did when getting the customers, you create a custom webhook request, but now you select POST instead of GET and input the data as you see below:

Test out the action to see that it runs (please note that the test actually creates the customer in Fortnox).

Now we've created the customer based on the recipient company name. Now we need to connect the correct customer number to that specific customer name. In order to do that we've created a short javascript that automatically produces this result.

Click the plus sign and search for Code by Zapier:

Add data in the same fashion as in the image below (code is under image):

//console.log('got name!', inputData.name);

let nameArr = inputData.name.split(',');
let numberArr = inputData.number.split(',');
for (var i = 0; i < nameArr.length; i++) {
if (nameArr[i] === inputData.find) {
output = {"name":nameArr[i], "number": numberArr[i]};
return output
}
}
output = {};

Almost there! Now we just need to create the order in Fortnox. Click the plus icon and search for webhooks again (same as you did before) and select custom request again:

Now we add the same headers as before, POST to Orders and adds the data in the same fashion as below:

As you can see from this image, we're mapping Article number to Recipient note in GetAccept. You could of course map any variable to it here, such as a selection in a dropdown in your GetAccept template (or make a calculation based on the order value/name of document or similar).

All set! This zap will now create a new customer and connect a new order everytime a new customer signs a deal in GetAccept.

If you have any questions, please don't hesitate to ask in the chat.

Did this answer your question?