Developer Preview — This project is in active development. APIs may change. Provide feedback
Skip to content

@salesforce/b2c-tooling-sdk / operations/mrt / createNotification

Function: createNotification()

createNotification(options, auth): Promise<object & object & object>

Defined in: packages/b2c-tooling-sdk/src/operations/mrt/notification.ts:218

Creates a notification for an MRT project.

Parameters

options

CreateNotificationOptions

Create notification options

auth

AuthStrategy

Authentication strategy (ApiKeyStrategy)

Returns

Promise<object & object & object>

The created notification

Throws

Error if request fails

Example

typescript
import { ApiKeyStrategy } from '@salesforce/b2c-tooling-sdk/auth';
import { createNotification } from '@salesforce/b2c-tooling-sdk/operations/mrt';

const auth = new ApiKeyStrategy(process.env.MRT_API_KEY!, 'Authorization');

const notification = await createNotification({
  projectSlug: 'my-storefront',
  targets: ['staging', 'production'],
  recipients: ['team@example.com'],
  deploymentStart: true,
  deploymentFailed: true
}, auth);

Released under the Apache-2.0 License.