Merchant Configurations

Use the Bringg Dispatcher SDK Merchant Configurations methods to configure Bringg merchant functionality in your own systems.

Overview

Use the Bringg Dispatcher SDK merchant configuration functionality to:

📘

Exception Handling

The Bringg Dispatcher SDK Merchant Configurations methods use a promise pattern and a decorator factory for error exception handling. You can chain your method callback using then and catch to customize error handling for your own application. You can also delegate the Bringg Dispatcher SDK Logger to various log levels and implement your own functionality. For more information, see Exception Handling.

Syntax

bringgDashboardSDK.merchantConfiguration.

Examples

The following examples include three types of implementation:

  • web
  • node.js
  • TypeScript

This code snippet demonstrates the merchantConfiguration.get() method.

<!doctype html>
<html lang="en">
<head>
  <!-- ... -->
  <script src="/bringg-dashboard-sdk.js"></script>
</head>
<body>
<!-- ... -->
<script>
BringgDashboardSDK.initWithAuthToken(region, authToken).then(bringgDashboardSDK => {
  bringgDashboardSDK.merchantConfiguration.get().then(console.log).catch(console.error);
});
</script> 
</body>
</html>
const BringgDashboardSDK = require("bringg-dashboard-sdk");

BringgDashboardSDK.initWithAuthToken(region, authToken).then(bringgDashboardSDK => {
  bringgDashboardSDK.merchantConfiguration.get().then(console.log).catch(console.error);
});
import BringgDashboardSDK = require("bringg-dashboard-sdk");

async function runAwait() {
  
  try {
      const bringgDashboardSDK = await BringgDashboardSDK.initWithAuthToken(region, authToken);
      console.log(await bringgDashboardSDK.merchantConfiguration.get();
    } catch (e) {
      console.error(e); 
    }
  }

runAwait();

Methods

merchantConfiguration.get()

Get a object containing your merchant information.

Input Parameters

None

Response

Object

JSON

A MerchantConfiguration object containing the merchant configuration details.

merchantConfiguration.update(:MerchantConfigurationKeys)

Updates your merchant configuration details.

Input Parameters

MerchantConfigurationKeys

See Description

REQUIRED

Any attibutes in the MerchantConfiguration object to update.

Response

Object

JSON

A MerchantConfiguration object containing the updated merchant configuration details.

merchantConfiguration.resetDeliveryPin()

Resets the delivery pin to the default.

Input Parameters

None

Response

string

The default delivery pin.

merchantConfiguration.deliveryPinChange(:alternativePin)

Changes your delivery pin.

Input Parameters

alternativePin

string

REQUIRED

The new delivery pin.

Response

Object

JSON

A MerchantConfiguration object containing the merchant delivery pin.

merchantConfiguration.resetDestinationPin()

Reset the destination pin to the default.

Input Parameters

None

Response

N/A

string

The default destination pin.

merchantConfiguration.getCsvFields()

Get the CSV fields used by your merchant.

Input Parameters

None

Response

Array of Objects

JSON

A MerchantConfigurationCSVField object containing the merchant configuration CSV field details.

merchantConfiguration.setCsvFields(:csvFields)

Update the CSV fields used by your merchant.

Input Parameters

csvFields

Object

REQUIRED

An array of MerchantConfigurationCSVField objects containing the merchant configuration CSV field details to update.

Response

Array of Objects

JSON

A MerchantConfigurationCSVField objectz containing the merchant configuration CSV field details updated.

merchantConfiguration.resetClientAppLogo()

Reset your client app logo to a new logo.

Input Parameters

None

Response

string

The default client app logo.

merchantConfiguration.resetEmailLogo()

Resets the email logo to the default.

Input Parameters

None

Response

string

The default email logo.

merchantConfiguration.resetPublicTaskFormLogo()

Resets the public task form logo to the default.

Input Parameters

None

Response

string

The default public task form logo.

merchantConfiguration.getRatingReasonConfiguration()

Gets the rating reasons configuration.

Input Parameters

None

Response

Array of Objects

JSON

A RatingReasonConfig object containing the rting reason configuration details.

merchantConfiguration.setRatingReasonConfiguration (:RatingReasonConfig)

Updates the rating reasons configuration.

Input Parameters

Object

JSON

REQUIRED

A RatingReasonConfig object containing the attributes to change.

Response

Object

JSON

REQUIRED

A RatingReasonConfig object containing the attributes to change.

merchantConfiguration.requestBetaProgram()

TBD

merchantConfiguration.getTipDriverConfiguration()

Get your driver tip configuration.

Input Parameters

None

Response

DriverTipConfiguration

Object

A DriverTipConfiguration object containing the driver tip configuration information.

merchantConfiguration.setTipDriverConfiguration (:DriverTipConfiguration)

Update your driver tip configuration.

Input Parameters

DriverTipConfiguration

Object

REQUIRED

A DriverTipConfiguration object containing the driver tip configuration attributes to changes.

Response

N/A

string

TBD

merchantConfiguration.notifyCustomers(:text, :url, :sendAll, :customerIds[])

Send a notification to a customer or group of customers by customer Id.

Input Parameters

customerIds

Array of numbers

An array of numbers containing the custer Id or Ids to which the notification will be sent.

sendAll

boolean

Indicates whether the notificaiton should be sent to all customers. The values are:

  • false - do not send to all customers
  • true - send to all customers

text

string

The text of the message to send.

url

string

A URL to send in the notification.

Response

N/A

boolean

Indicates whether the notification was successfully sent. The values are:

  • false - notification failed
  • true - notification succeeded

merchantConfiguration.getPublicTaskForm()

Get a public task form.

Input Parameters

None

Response

PublicTaskFormFormat

Object

A PublicTaskFormFormat object containing detailed information about the public task form.

merchantConfiguration.setPublicTaskForm(:color, :PublicTaskForm[])

Update a public task form.

Input Parameters

color

string

REQUIRED

The color of the public task form.

PublicTaskForm

Array of Objects

REQUIRED

An array of PublicTaskFormFormat objects containing the public task forms to update.

Response

merchantConfiguration.getMobileTaskForm()

Get a mobile task form.

Input Parameters

None

Response

Object

JSON

A MobileTaskForm object containing detailed information about the mobile task form.

merchantConfiguration.setMobileTaskForm(:form)

Update a mobile task form.

Input Parameters

Object

JSON

REQUIRED

A MobileTaskForm object containing the mobile task form attributes to set.

Response

Object

JSON

A MobileTaskForm object containing detailed information about the mobile task form.