---
title: Integration events
summary: Open one event of an integration client to change its web address, its projects and the functions that map the data going out and coming in.
order: 2
menu: Company settings > Integration Setup
who: People who have the Integrations Add permission. People with only View can see the list of events in the client.
---

An integration event is one operation in one area that passes between Superwise and an integration client. For example, the event Add in the area Purchase Orders. An outgoing event goes from Superwise to the client. An incoming event comes from the client to Superwise.

You choose which events a client shares when you add the client. See [Integration clients](clients.md). Use this page to change one event after that. You set the web address for outgoing events, the projects it applies to, and two functions. The request mapping function changes the data before it is sent. The response mapping function reads the answer.

## Before you start

- Add the client and choose its events. See [Integration clients](clients.md#how-to-add-an-integration-client).
- Know how the other system names its fields. You write the functions in JavaScript.

## How to open an event

1. Open **Company settings** in the left menu, then click **Integration Setup**.
2. Click the arrow at the start of the client row.
3. On the tab **Events**, find the event. The columns are **Area**, **Operation** and **Resource Url**. An arrow down next to the operation means an incoming event. An arrow up means an outgoing event.
4. Click the gear icon at the end of the row.

## How to change an event

The form has three steps: **Event Details**, **Request Mapping Function** and **Response Mapping Function**. Click a step at the top, or use the arrows at the bottom to move between them.

1. On step 1, **Event Details**, check **Area** and **Event**. You cannot change them.
2. For an outgoing event, type the web address in **Url**. For an incoming event, **Url** is fixed. Give this address to the other system so that it knows where to send its data.
3. If **Projects To Be Associated** shows, choose the projects the event applies to.
4. For an outgoing event, tick **Triggered Manually** if the event should be sent only when you send it by hand. See [Event log](event-log.md#how-to-send-records-that-were-never-sent).
5. On step 2, write the **Request Mapping Function**. On step 3, write the **Response Mapping Function**. Click the information icon next to each name to see what the function can use.
6. Click **SAVE**. A message says **Event Modified**.
7. Click **BACK TO CLIENT** to return.

## What the fields mean

| Name | What it means |
| --- | --- |
| **Area** | The part of Superwise the event belongs to, for example Purchase Orders. |
| **Event** | The operation, such as Add or Edit, with an arrow for incoming or outgoing. |
| **Url** | The web address Superwise sends an outgoing event to. For an incoming event it is the address of Superwise that the other system calls. |
| **Projects To Be Associated** | The projects the event applies to. It shows only for areas that belong to a project. |
| **Triggered Manually** | Outgoing events only. On: the event is sent only when you send it by hand. |
| **Request Mapping Function** | A function that builds the data to send. It can use **Log**, which works like console.log, and **Http**, to make web requests. |
| **Response Mapping Function** | A function that reads the answer. It can use **Log** and **Http** too. |

## What the columns mean

| Name | What it means |
| --- | --- |
| **Area** | The part of Superwise. |
| **Operation** | The operation and its direction. |
| **Resource Url** | The web address of the event. |

## Rules to know

- You cannot add or remove events here. Change the choice of events in the form of the client.
- The mapping functions are required.
- Only the people with the Add permission for Integrations open the event form.

## If something goes wrong

| What you see | What to do |
| --- | --- |
| Event Not Modified | Read the reason that follows. Fix it and click **SAVE** again. |
| The tab **Events** says No Records. | The client has no events. Edit the client and choose events in step 2. |

## Related pages

- [Integration setup](index.md)
- [Integration clients](clients.md)
- [Event log](event-log.md)
