> ## Documentation Index
> Fetch the complete documentation index at: https://developer.plugchoice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Actions

> What your app opens Link for: add a charger, change its network, set it up or reconnect it.

export const Screen = ({name, alt, caption, wide = false}) => {
  const style = wide ? {
    width: '100%'
  } : {
    width: '280px',
    maxWidth: '100%'
  };
  return <figure style={{
    margin: '1.5rem 0',
    textAlign: 'center'
  }}>
      <img className="block dark:hidden" src={`/images/sdk/${name}-light.webp`} alt={alt} style={{
    ...style,
    margin: '0 auto',
    borderRadius: '12px',
    border: '1px solid rgba(128, 128, 128, 0.25)'
  }} />
      <img className="hidden dark:block" src={`/images/sdk/${name}-dark.webp`} alt={alt} style={{
    ...style,
    margin: '0 auto',
    borderRadius: '12px',
    border: '1px solid rgba(128, 128, 128, 0.25)'
  }} />
      {caption ? <figcaption style={{
    marginTop: '0.5rem',
    fontSize: '0.875rem',
    opacity: 0.7
  }}>{caption}</figcaption> : null}
    </figure>;
};

Your app opens Link with an **action**. The action says what the link session does; the hosted flow decides how, for each brand and model.

| Action | What your user does | Needs |
| - | - | - |
| `add` | Adds a charger: picks the brand and model, sets it up and connects it to Plugchoice | A scope that allows adding: `sites`, `location` or `new_site` |
| `network` | Changes a charger's network, such as a new Wi-Fi | `chargerId`; the charger's `network_setup` capability |
| `setup` | Answers the electrical setup questions: phases, maximum current, grid type, phase rotation | `chargerId`; the charger's `electrical_setup` capability |
| `reconnect` | Brings a charger that went offline back to Plugchoice, the way its brand connects | `chargerId` |

Every action but `add` works on one charger, which must be in the client session's scope. See [Client sessions and scopes](/sdk/concepts/client-sessions).

## Open an action

| Action | iOS | Android | React Native |
| - | - | - | - |
| Add a charger | `.addCharger()`, `.addCharger(siteId:)` | `LinkAction.addCharger()`, `LinkAction.addCharger(siteId)` | `{ action: 'add', siteId? }` |
| Change its network | `.network(chargerId:)` | `LinkAction.network(chargerId)` | `{ action: 'network', chargerId }` |
| Set it up | `.setup(chargerId:)` | `LinkAction.setup(chargerId)` | `{ action: 'setup', chargerId }` |
| Reconnect it | `.reconnect(chargerId:)` | `LinkAction.reconnect(chargerId)` | `{ action: 'reconnect', chargerId }` |
| A newer action | `.custom("name", chargerId:)` | `LinkAction.custom("name", chargerId, siteId)` | `{ action: 'name', chargerId?, siteId? }` |

The SDK passes the action to the hosted flow without reading it. A new action therefore works in an SDK you already shipped, through the custom form, before the SDK gets a helper for it.

## Add a charger

`add` is the default. Your user agrees to share their charger with you (the first time), picks the brand and model, and follows the steps for it: joining the charger's hotspot, finding it on the home network, sending it the Wi-Fi over Bluetooth, signing in to the brand's account, or typing its Chargepoint ID. Link waits until the charger is online, asks the electrical setup questions for models that have them, and closes. What each brand needs is on [Supported chargers](/sdk/chargers).

## Change a charger's network

`network` sends a charger its network settings from the phone. Link shows only the network steps, then waits until the charger is online again. Offer it only where the charger's `network_setup` capability is `capable` and the phone has every transport it `needs`. See [Devices and capabilities](/sdk/concepts/capabilities).

<Columns cols={2}>
  <Screen name="network-wifi" alt="Link asking for the Wi-Fi network and password to send to the charger" caption="The Wi-Fi for the charger" />

  <Screen name="network-done" alt="Link confirming that the charger is online on its new network" caption="Done" />
</Columns>

## Set a charger up

`setup` asks the electrical setup questions and applies the answers to the charger: one or three phases, the maximum current per phase, the grid type and the phase rotation. Offer it where the charger's `electrical_setup` capability is `capable`.

<Screen name="setup-wizard" alt="Link asking how the charger is connected" />

## Reconnect a charger

`reconnect` brings a charger that went offline back to Plugchoice, the way its brand connects: the Wi-Fi from the phone for a Volt Time One, its hotspot for a Peblar, the home network for an Alfen, or the steps to point it at Plugchoice by hand. Every charger can be reconnected.

<Screen name="reconnect" alt="Link starting to reconnect a charger" />

## When a charger can't do an action

If the charger can't do the action here (its model has no flow for it, or the phone lacks what it needs), or the action is one the hosted flow doesn't know, Link shows what the charger can do instead and lets your user pick.

<Screen name="actions" alt="Link asking what you want to do with the charger" />

The result's `action` says which action the link session ended up doing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.