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

# PFCloudScriptExecuteEntityCloudScriptRequest

> PFCloudScriptExecuteEntityCloudScriptRequest data model. Executes CloudScript with the entity profile that is defined in the request.

PFCloudScriptExecuteEntityCloudScriptRequest data model. Executes CloudScript with the entity profile that is defined in the request.

## Syntax

```cpp theme={null}
typedef struct PFCloudScriptExecuteEntityCloudScriptRequest {  
    PFStringDictionaryEntry const* customTags;  
    uint32_t customTagsCount;  
    PFEntityKey const* entity;  
    const char* functionName;  
    PFJsonObject functionParameter;  
    bool const* generatePlayStreamEvent;  
    PFCloudScriptCloudScriptRevisionOption const* revisionSelection;  
    int32_t const* specificRevision;  
} PFCloudScriptExecuteEntityCloudScriptRequest;  
```

### Members

**`customTags`**   [PFStringDictionaryEntry](/services/playfab/api-references/c/pftypes/structs/pfstringdictionaryentry) const\*<br />*may be nullptr*

(Optional) The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).

**`customTagsCount`**   uint32\_t

Count of customTags

**`entity`**   [PFEntityKey](/services/playfab/api-references/c/pftypes/structs/pfentitykey-c) const\*<br />*may be nullptr*

(Optional) The optional entity to perform this action on. Defaults to the currently logged in entity.

**`functionName`**   const char\*<br />*is null-terminated*

The name of the CloudScript function to execute.

**`functionParameter`**   [PFJsonObject](/services/playfab/api-references/c/pftypes/structs/pfjsonobject)

(Optional) Object that is passed in to the function as the first argument.

**`generatePlayStreamEvent`**   bool const\*<br />*may be nullptr*

(Optional) Generate a 'entity\_executed\_cloudscript' PlayStream event containing the results of the function execution and other contextual information. This event will show up in the PlayStream debugger console for the player in Game Manager.

**`revisionSelection`**   [PFCloudScriptCloudScriptRevisionOption](/services/playfab/api-references/c/pfcloudscripttypes/enums/pfcloudscriptcloudscriptrevisionoption) const\*<br />*may be nullptr*

(Optional) Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision. The default value is 'Specific', if the SpecificRevision parameter is specified, otherwise it is 'Live'.

**`specificRevision`**   int32\_t const\*<br />*may be nullptr*

(Optional) The specific revision to execute, when RevisionSelection is set to 'Specific'.

## Requirements

**Header:** PFCloudScriptTypes.h

## See also

[PFCloudScriptTypes members](/services/playfab/api-references/c/pfcloudscripttypes/pfcloudscripttypes_members)


## Related topics

- [PFCloudScriptExecuteEntityCloudScriptAsync](/services/playfab/api-references/c/pfcloudscript/functions/pfcloudscriptexecuteentitycloudscriptasync.md)
- [Services C API overview - PFCloudScriptTypes.h](/services/playfab/api-references/c/pfcloudscripttypes/pfcloudscripttypes_members.md)
- [PFCloudScriptServerExecuteCloudScriptAsync](/services/playfab/api-references/c/pfcloudscript/functions/pfcloudscriptserverexecutecloudscriptasync.md)
- [PFCloudScriptClientExecuteCloudScriptAsync](/services/playfab/api-references/c/pfcloudscript/functions/pfcloudscriptclientexecutecloudscriptasync.md)
- [PFCloudScriptExecuteEntityCloudScriptGetResult](/services/playfab/api-references/c/pfcloudscript/functions/pfcloudscriptexecuteentitycloudscriptgetresult.md)
