# Setar contexto LivePerson

{% hint style="info" %}
Disponível somente no canal **LivePerson** em **Whatsapp**
{% endhint %}

## Atributos

```javascript
[
    {
        "name": "set_context_liveperson",
        "parameters": {
            "context": {
                "minha_variavel": "valor"
            },
            "integration_id": "<integration_id>"
        },
        "result_variable": "context_response"
    }
]
```

* **name:** set\_context\_liveperson
* **parameters:**
  * **context:** variáveis de contexto que serão setadas no atendimento de destino.
  * **integration\_id:** identificador da integração de destino. Este identificador pode ser encontrado na listagem de integrações com a LivePerson.
* **result\_variable:** variável de contexto que receberá o resultado da ação. Em caso de sucesso, essa variável conterá o seguinte JSON:

  ```javascript
  {
    "status": "ok",
    "message": "Target contact: <identificador do contato que recebeu o contexto>"
  }
  ```

## Exemplo

```javascript
[
    {
        "name": "set_context_liveperson",
        "parameters": {
            "context": {
                "persistent": {
                    "cpf": "<? $cpf ?>",
                    "nome": "<? $nome ?>",
                    "tipo_servico": "<? $tipo_servico ?>"
                }
            },
            "integration_id": 2
        },
        "result_variable": "context_response"
    }
]
```

Ao executar a ação acima, os dados passados no atributo `context` serão inseridos no contexto do atendimento que foi feito pelo assistente da integração de ID 2. Caso nenhum atendimento for encontrado, um novo será criado.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.altu.d1.cx/build/assistentes/builder/componentes/actions/set_context_liveperson.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
