---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/jobs](../index.md) / mapCanonicalToOcapiExecution

# Function: mapCanonicalToOcapiExecution()

> **mapCanonicalToOcapiExecution**(`canonical`): `object`

Defined in: [packages/b2c-tooling-sdk/src/operations/jobs/ocapi-mapping.ts:87](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/operations/jobs/ocapi-mapping.ts#L87)

Map a canonical [JobExecutionInfo](../interfaces/JobExecutionInfo.md) back into the raw OCAPI
[JobExecution](../type-aliases/JobExecution.md) (snake_case) shape.

The reverse of [mapOcapiExecution](mapOcapiExecution.md). System-job operations
(site-archive import/export, CAP install/uninstall) expose the raw OCAPI
`JobExecution` in their public result/error types; when those operations are
served over SCAPI, the canonical result is mapped back through this so the
public contract stays identical across backends.

Prefers the original OCAPI payload when present in `_raw` (lossless
round-trip for the OCAPI path); otherwise projects the canonical fields.

## Parameters

### canonical

[`JobExecutionInfo`](../interfaces/JobExecutionInfo.md)

## Returns

`object`
