---
schema_version: "1"
id: 41e67c76e2f80fd76d5b0f9b45123e4d6d089106c96f02660f8687aac8c030d0
title: Interface Context
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforce-functions/functions/guide/javasdk/interfaces/java-context.md
canonical_url: https://developer.salesforce.com/docs/platform/functions/guide/java-context.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3781fb8f4db02b356077b69b953eee3abc77c06c63b98909953a0f9b5d214104
products:
  - Salesforce Functions
---
# Interface Context

------------------------------------------------------------------------

public interface Context

Represents the connection to the the execution environment and the
Salesforce instance that the function is associated with.

## Method Summary

| Modifier and Type         | Method     | Description                                                                              |
| ------------------------- | ---------- | ---------------------------------------------------------------------------------------- |
| `java.lang.String`        | `getId()`  | Returns the unique identifier for a given execution of a function.                       |
| `java.util.Optional<Org>` | `getOrg()` | Returns information about the invoking Salesforce organization and user. |

## Method Details

### getId

\@Nonnull java.lang.String getId()

Returns the unique identifier for a given execution of a function.

Returns: The unique identifier for a given execution of a function.

### getOrg

\@Nonnull java.util.Optional\<Org\> getOrg()

Returns information about the invoking Salesforce organization and user.

Returns: Information about the invoking Salesforce organization and
user.
